How to achieve or option in query builder taxonomies?

Hello,

I have added a term option to CPT and put different posts in different terms. Now I would like to have just one template in CS for specific posts associated with terms.

My idea was to use a query builder and filter posts based on terms but there isn’t an OR option. Only AND.

Is it possible to have OR option or that should be written in Query String?

Hello @ofirdoo,

Thanks for writing to us.

Regretfully there is no option at the moment I would suggest you please set the looper provider as a query string and you can use the category__in parameters where you can insert the multiple category ID.

Query

$args = array(
'post_type'              => 'post',
'post_status'            => 'publish',
'posts_per_page'         => '12',
'order'                  => 'DESC',
'category__in'      => array(34,55),
);

echo http_build_query($args);

Query string

 post_type=post&post_status=publish&posts_per_page=12&order=DESC&category__in%5B0%5D=34&category__in%5B1%5D=55 

Please feel free to change the category ID as per your requirement

Hope it helps
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.