Is there a way to place multiple image galleries in a single post?
Please note that:
-
I would only like to use WordPress’ built-in gallery function, and not something else, like NextGen gallery.
-
I know that I can group images in a post using
or
, but the thing is, when the user goes to the attachments page (after clicking a thumbnail in the image gallery in a post), all the images are together. I would like to have two completely different galleries in a single post.
-
I know that I can create two pages, add the two sets of images that I have, and then add the two image galleries in a post using
and
. I do NOT want to do this, as pages are not meant for this (unless, of course, there’s no way around). -
There are plugins that claim to do this, but most of them:
-
Only group images, like I mentioned in point (2).
-
Others have been developed at least 6 months ago, and the questions by users in the support forums are left unanswered by the plugin authors. So, they are a no-go for me.
-
Is there at all a way to post multiple image galleries in a single post? It would be awesome if there’s. Thanks.
No, because galleries are defined as being all the images attached to a single Post. Therefore one Post cannot have multiple galleries because that goes against the definition of what a “gallery” is.
Your method #3 will be as close as you can get, however you don’t have to use Pages specifically. You can use Posts to separate galleries as well.
For the time being (until someone has a workaround), here’s what I am doing â step-by-step:
1. Created a new category titled “Gallery”
2. The category is hidden from homepage only (and not category pages) using this code â (MORE INFO):
<?php query_posts($query_string . '&cat=-ID'); ?>
(replace ID with the category ID)Which is added right above:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
in index.php3. This means, I now have a category page showing off all the galleries. I think it’s cool. If you don’t think so, just don’t mention that category in menus, or link to it anywhere on your website. Basically, then people won’t know that it even exists. It doesn’t matter if Google comes to know of it, you won’t be penalized.
4. Exclude ‘Gallery’ category from the main RSS feed. There are many ways to do that; more info HERE and HERE.
5. Based on your theme, you may have to make some changes elsewhere, like “Latest Posts” or “Popular Posts” widgets. And I guess, most of us have to deal with it.
6. And then again, based on your intentions, you may also want to omit one of the steps mentioned above.
This is the closest I can think of, as I can’t code. There are plugins that do exactly what we want here, but they are too new with too many downvotes, or lack any support from the plugin author in the forums. FWIW.