I have a Image Gallery in NextGen and i want to show it on a page but problem is whenever i am loading image gallery with custom template it isn't loading here how is what i did, first i have a page homepage.php
and at some place i added this code to show the gallery:
<?php
$NextG = new NextGEN_Shortcodes;
echo $NextG->show_gallery( array("id"=>1,"images"=>5,"template"=>"myshow") );
?>
my template file myshow.php
contains this :
<ul id="slideshow">
<!-- Thumbnails -->
<?php foreach ( $images as $image ) : ?>
<li>
<?php if ( !$image->hidden ) { ?>
<img src="<?php echo $image->imageURL ?>" alt="<?php echo $image->alttext ?>" />
<?php } ?>
</li>
<?php endforeach; ?>
</ul>
Now Template file named myshow.php
is located in wordpress\wp-content\themes\nggallery
and when i run the page it returns the images but it used default template what is wrong am i putting the wrong name??? am i putting the Template in wrong directory?? or is there something else ?
Ok i got the answer i only have to put right name prefix for my file "gallery-<mytemplatename>"
so in above case it will be gallery-myshow.php