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 have created a custom page template. In the template, I use a shortcode for JJ NextGen JQuery Slider. I would like the page to have a 'custom field' called 'Image Gallery' with a value that derives from NEXTGEN Gallery. I am trying to get the page template to recognize the dynamic input of the value from the shortcode but I haven't had success. Any advice is much appreciated! Here is the code I am using:

<div id="prop_images">
                <?php echo do_shortcode('[jj-ngg-jquery-slider title="Property" gallery="get_post_meta($post ->ID, 'Image_Gallery', true)" effect="fade" html_id="about-slider" width="400" height="300"]'); ?>
                </div><!-- end prop images-->
share|improve this question

1 Answer 1

try creating the string first:

    <?php 
    $shortcode = '[jj-ngg-jquery-slider title="Property" gallery="'.get_post_meta($post ->ID, 'Image_Gallery', true).'" effect="fade" html_id="about-slider" width="400" height="300"]';
    echo do_shortcode($shortcode); 
    ?>
share|improve this answer
    
That worked! Thank you so much for your help :-) –  NRUTA Oct 4 '11 at 23:28

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.