Tell us what you are trying to do?
I am trying to create a view that filters content by the categories set by the parent page. I want this view to filter Content using the AND operator. Currently it works with an OR operator and i have no UI options to change that.
Is there any documentation that you are following?
no
Is there a similar example that we can see?
no
What is the link to your site?
hidden link

Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Can you please share admin access details and let me know what is your expected results.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Thank you for sharing admin login. The shared admin access details works but I can only access the profile page. It seems that the admin capability is not granted.
Can you please gant admin capabilities to that user so that I can access the admin section without any restrictions.
I have set the next reply to private which means only you and I have access to it.
I have updated the role to admin. Sorry for that.
Can you please check now: hidden link
I've added the following view's filter hook "wpv_filter_query" to "Custom Code" section offered by Toolset:
=> hidden link
add_filter( 'wpv_filter_query', 'func_filter_taxonomy_with_and_clause', 99, 3);
function func_filter_taxonomy_with_and_clause( $query,$view_settings ,$view_id ) {
// Optional: limit to a specific View ID
if ( (int) $view_id !== 10313 ) {
return $query;
}
$query['tax_query'][0]['operator'] = 'AND';
return $query;
}
More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/#adding-custom-php-code-using-toolset
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
Thanks very much. this worked like a charm