I'm working on a project that will require two separate galleries to be displayed on the same post. One gallery is specific to the product and the other is professional generic shots. The content of both galleries will change with every post.

I need to figure out how to show two separate galleries on a post and repeat this process daily.

The only way that I can think of is to store images in another post (post-b) and insert post-b using either @MikeSchinkel's or @Scribu's post to post connector.

What would you do?


If possibile, use NextGen Gallery plugin, to manage the gallery, and with the help of custom fields, manage it in the post

You can create two custom fields, like:

  1. first_gallery
  2. second_gallery

and fill it with the nextgen gallery ID. You can do a custom metabox with a select box, if you want.

The in the frontend code, use

   $first = get_post_meta($post->ID, 'first_gallery',true);
   $second = get_post_meta($post->ID, 'second_gallery',true);
   echo do_shortcode('[nggallery id='.$first.']');
   echo do_shortcode('[nggallery id='.$second.']');

Hope this it helps.

Bonus: there are many nextgen gallery plugins that let you change how the gallery is rendered to the user.

  • Thanks @keatch I'll have to look into NGG some more. I didn't even think of that plugin. :)
    – m-torin
    Aug 9 '11 at 16:18
  • Ok, let me know!
    – keatch
    Aug 9 '11 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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