This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Syntax for requiring multiple categories in post-loop taxonomy

6 years ago · Last reply by Andrew Misplon 6 years ago

Hello,

We are attempting to set up a post loop where the loop only pulls posts which have all of the specified categories. When just added the taxonomies look like

category:tennis,category:success-stories,category:featured

We have tried these variations without success:

category:sportfit & category:success-stories & category:featured

category:sportfit && category:success-stories && category:featured

category:sportfit and category:success-stories and category:featured

We do find that if we go to trouble of locating category IDs we can specify under Additional like so

‘category__and’ => array(1486,102)

But my editors would be much happier if we could just do the cat look up by name.

Possible?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 6 years, 10 months ago

    Hi Jerry

    Thanks for posting.

    Unfortunately, the Additional field would need to be used for the ‘category__and’ selection. I’ll chat to the team about how we could make this easier in the future. Sorry I don’t have anything to offer at the moment.

  2. jerrygarciuh 6 years, 10 months ago

    Thank you! Appreciate the reply!

  3. Andrew Misplon Staff 6 years, 10 months ago

    For sure. Sorry, we can’t assist with a solution right away. I’ve raised this with the team and logged an issue on Github now.

    Cheers for now :)

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread