WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

try creating the string first:

    $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


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.