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.

Post Loop Widget query issue – category__and

Resolved 3 replies generalquestion
9 years ago · Last reply by Alex S 9 years ago

I wanted to use the Post Loop widget instead writing a new loop because I didn’t have a complex query to run.

I clicked on “Build Posts Query” to access the “Additional” field. I’m simply trying to use the additional field to search for a post with category 1 AND 2, but nothing else.

It doesn’t seem to like what I put in as I keep getting incorrect results.

What is the proper way to use category__and in this case?

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

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Alex S Staff 9 years, 11 months ago

    Hi Alexramsee,

    I would suggest using the taxonomies field to do this instead. It’s a much more user-friendly interface for setting categories. Regardless, the correct query would be, cat=1,2 If you need to exclude a specific category use prepend – before the category id.

  2. alexramsee 9 years, 11 months ago

    Alrighty! Good to know. Thanks for the info.

  3. Alex S Staff 9 years, 11 months ago

    Hi Alexramsee,

    No problem. :) Is there anything else I can help you with today?

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