If you are asking how to include NextGen galleries in template files (such as your index.php file) instead of in posts or pages you can use this method:
<?php
$showalbum = '[album=AlbumName,compact]';
$showalbum = apply_filters('the_content', $showalbum );
echo $showalbum;
?>
The above method defines a variable which stores the nextgen gallery shortcode. You need to change AlbumName to the name of the Album you want to display. The variable, containing the shortcode, is then passed through the content filter which will render out the gallery to your template file when the page is loaded.
Hope that helps.
what about the widget plugin? I have it installed on my sidebar using the widget editor but I want to place it on the index.php file to call the most recent photos from all albums.
Also, any idea how you can increase the number of photos the widget shows…it is currently set to a maximum of 9.
Thanks.
churchthemer,
Thank you! That worked. You have to change '[album=AlbumName,compact]'; to [gallery=ID] or [slideshow=ID] where the ID is the ID of which ever gallery you want to display.
Thanks again.
Glad it worked. I’d only done the filter with albums before, glad to know it works on the other shortcodes as well.