Filter Missing When Adding Custom Meta Query
-
I have a product page with Product Filters active on the sidebar. I am trying to add a custom meta query in the functions.php but everytime I do, the Filters in the sidebar go missing. This is the query that I am setting:
$meta_query = $q->get( ‘meta_query’ );
$meta_query[] = array( ‘key’ => ‘user_role_visibility’, ‘compare’ => ‘LIKE’, ‘value’ => $user_role );
$q->set( ‘meta_query’, $meta_query );Can you advise what may be the reason why the Filters are missing? Thanks!
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Filter Missing When Adding Custom Meta Query’ is closed to new replies.