Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As far as I can see, this is kind of a bug for the standard category taxonomy. In fact, if you try that syntax with any other taxonomy, it works. So, a workaround could be to convert the standard category taxonomy into a custom taxonomy and make it behalf as a category with <code>'hierarchical' =&gt; true</code>. Then you will be able to use something like: </p> <blockquote> <p>?custom-taxonomy=slug1+slug2.</p> </blockquote> <p>Not very elegant, but it could be a solution for you.</p> <p>EDIT: As WordPress evolved, we can say that the standard Category and Tags became special cases of the <a href="http://codex.wordpress.org/Taxonomies" rel="nofollow">Taxonomy</a> concept. Each of them is a default Taxonomy for posts. Since version 2.3 WordPress introduced custom taxonomies. With custom taxonomies, you can create any kind of special taxonomy, with some possible customization, that make them behalf more like a tag or more like a category. That said, they all work with the same syntax, let's say: </p> <blockquote> <p>yoursite.com/?taxonomy-name=taxonomy-item</p> </blockquote> <p>That url will list all the posts categorized as <code>taxonomy-item</code>. For some reason (a bug, I guess), the standard ?cat=1+2 does not work as it should, but every other taxonomy does, indeed. To be clear, you could replace</p> <blockquote> <p>yoursite.com/?cat=dogs+cats</p> </blockquote> <p>with</p> <blockquote> <p>yoursite.com/?pets=dogs+cats</p> </blockquote> <p>by creating a custom taxonomy named 'pets'. And that will do the job.</p> <p>If you create a custom taxonomy, and use it as a replacement to you standard category, you would be able to make this work with no further development. If you are unfamiliar with custom taxonomies, try the <a href="http://wordpress.org/extend/plugins/custom-post-type-ui/" rel="nofollow">Custom Post Type UI</a> plugin, that will do the dirty work for you. The most important setting in order to have a custom taxonomy that behaves as the default categories is to set it as hierarchical.</p> <p>Let's say you create a custom taxonomy called "new-cats". After that, you will be able to use yoursite.com/?my-cats=cat1+cat2 and that will list post categorized with cat1 AND cat2. By the way, this could give some SEO benefits out of the box. Of course, you will need to categorize all of your posts with the new taxonomy. Something like this could help <a href="http://themespotter.com/how-to-convert-post-tags-to-custom-taxonomies-in-wordpress/" rel="nofollow">http://themespotter.com/how-to-convert-post-tags-to-custom-taxonomies-in-wordpress/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload