I need to show a lot of different galleries each on its own page but don’t want to create an individual page for each gallery
Is there a way of passing the gallery id into a template and having php display that gallery.
What I have done below works with the first gallery page but clicking on the buttons for other pages now doesn’t work.
I created a theme template file and assign that template to page “test” and pass to it the gallery_id in a call like this
The page called test is just set to be the Gallery Display Template
and then I used php to call the Nextgen gallery in the template file as below:
<?php /* Template Name: Gallery Display Template */ ?>
<?php
/*
* Template Post Type: post, page
*/
$galleryid = $_GET[‘galleryid’];
get_header();
?>
<!– wp:imagely/nextgen-gallery –>
<?php
echo do_shortcode(‘[ngg src=”galleries” ids=”‘.$galleryid.’” display=”basic_thumbnail” thumbnail_crop=”0″]’);
?>
<!– /wp:imagely/nextgen-gallery –>
<?php
get_footer();
?>`
Thanks in advance for any pointers on getting something like this working
Neil