Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using NextCellent Gallery plugin and a custom theme. I created an Album, Gallery and wish to display the gallery in a new page. The gallery displays in the same page when

gallery>options>gallery settings>deactivate gallery page link is selected.

When the option is deselected the gallery displays as expected using the Twentythirteen theme.

In the Wordpress dashboard under gallery>manage gallery>create new page I click the add page button for each gallery but none show using my custom theme. I don't know if I need to create a custom gallery, custom template or modify the page.php to get the galleries to display.

I create a page Using a custom template var_dump($gallery) displays as null.

Template Name: Gallery Template
<?php get_header(); ?>
<?php var_dump($gallery) ?>
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>

    <div class="gallery">
    <h2><?php echo $gallery->title; ?></h2>

    <div class="images">

    <?php foreach($images as $image): ?>
        <img src="<?php echo $image->imageURL; ?>" alt="<?php echo $image->alttext;?>">
    <?php endforeach; ?>



<?php endif; ?>

<?php get_footer(); ?>

I sense I am only missing one or two functions but after two weeks of trying no longer know where to look.

share|improve this question

closed as off-topic by Mark Kaplun, Pieter Goosen, birgire, Johannes Pille, G. M. Sep 14 at 21:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, Pieter Goosen, birgire, Johannes Pille, G. M.
If this question can be reworded to fit the rules in the help center, please edit the question.