NextGen: Custom field slideshow-need gallery title, description in separate div
-
I’ve included various slideshows on different pages of my site using the gallery custom field with value slideshow on each page.
My slideshow shows up in a div on the left side of the page (https://tomasi-design.com/?page_id=7). I would like to somehow automatically pull in the gallery title and gallery description into the div on the right side (div class = postright – see below) based on the slideshow that shows up on that page.
Sounds like an if, then: If the custom field gallery is included on a page, then echo the title and description of that particular slideshow. I’ve tried several different options, including the one below, but I can’t seem to get it right.
Here’s one attempt to pull in the gallery description! Have included the code from my page template.php file (See div class=postright section)
<?php /* Template Name: Page Gallery */ ?> <?php get_header(); ?> <div id="content"> <div class="slideshowleft"> <?php $gallery = get_post_meta($post->ID, 'gallery', true); ?> <?php $gal = $gallery; $gal = apply_filters('the_content', $gal ); echo $gal; ?> </div> <div class="postright"> <?php if(get_post_meta($post->ID, 'gallery', true)) {;?> <?php echo $gallery->galdesc; ?> <?php } ?> </div> <div style="clear:both;"></div> <?php include(TEMPLATEPATH."/recent.php");?> </div> <!-- The main column ends --> <?php get_footer(); ?>
Any help is appreciated!
- The topic ‘NextGen: Custom field slideshow-need gallery title, description in separate div’ is closed to new replies.