WordPress.org

Support

Support » Plugins and Hacks » NextGen Gallery – Using Custom Field to insert gallery (Not the plugin)

NextGen Gallery – Using Custom Field to insert gallery (Not the plugin)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Maybe try –

    <?php  /* NG Gallery Custom Field Rotating Images  */
    $gallery_id = get_post_meta($post->ID, 'gallery', true);
    if( !empty($gallery_id) ){
    	$ngg_shortcode = '[ nggallery id=' . $gallery_id . ' template=galleryview images=0 ]';
    	echo do_shortcode($ngg_shortcode);
    }
    ?>

    I haven’t tested it, so it may still need some tweaking.

    Jimmy,

    Unfortunately, the page just displays:
    [ nggallery id= template=galleryview images=0 ]

    anybody have any input? I wish I could get in touch with: Rhand from the first link I provided but his site is in another language and the translator doesn’t do too well on the form and no way of direct contact on here. It seems like he got it to work.

    This has been driving me crazy though, I do appreciate your input Jimmy, maybe you or someone else has another idea on it.

    Thanks again!

    Anyone have any ideas..? I could really use some help on this.

    Thank you.

    Anyone come up with any fix for this?

    Thank you, I am sorry to keep spamming the thread, but I could really use a hand getting this to function.

    Just did some extra research, try the ‘nggShowAlbum’ function. There’s some instructions here:
    http://wordpress.org/support/topic/how-to-insert-nextgen-gallery-slideshow-into-header

    http://wordpress.org/support/topic/plugin-nextgen-gallery-show-next-gen-album-outside-content-and-sidebar

    Goes without saying, make sure you are using the latest version of WP and NGG. I don’t have the time to test this (at work) but I’m pretty confident ‘nggShowAlbum’ should work. I’ll leave the fun part up to you 🙂

    From your link;

    Using WordPress Custom Fields to Display NextGen Gallery Slideshows Conditionally

    I was able to get my gallery functioning as needed.

    If you copy and paste the code from the example into the template where you want it, then when you’re entering the custom field info, change this to the same text as you would to display the gallery in the post eg:

    [slideshow=1, width=100, height=50]

    I used this method to move the gallery out of the main content so that I could control which page styles it was displayed on. I am using Tanzaku theme, so i only wanted it in the single post view, not the grid view (which is all the posts at once).

    So, you just change slideshow to whichever view you want.

    Hope this helps. It sounds like this is what you mean.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘NextGen Gallery – Using Custom Field to insert gallery (Not the plugin)’ is closed to new replies.