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.

<?php 
/*
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; ?>

    </div>

.
.
.
.

<?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
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.