WordPress.org

Forums

[Plugin: NextGen Smooth Gallery] Showing a gallery based on a custom field ID (2 posts)

  1. Matt Hancock
    Member
    Posted 5 years ago #

    I have a custom field in my code called 'gallery' which holds the album ID from NextGen Gallery.

    What I would like to do is parse that through to NextGen Smooth Gallery so it'll display the gallery alongside the post.

    I have the following at the top:
    <?php $gallery = get_post_meta($post->ID, 'gallery', true); ?>

    And I've been trying to call it using:
    <?php echo do_shortcode("[smooth=id:$gallery;]"); ?>

    But all it does is show [smooth=id$3]. (3 being the ID)

    What am I doing wrong?

  2. Matt Hancock
    Member
    Posted 5 years ago #

    Just uploaded the source code to http://pastebin.com/m59df2a28 and you can view it at http://wordpress.geek.nz/logan/test/

Topic Closed

This topic has been closed to new replies.

About this Topic