I am using the masonry gallery to display a custom post type. In this custom post types I have custom fields. Example: city. I would like in the masonry plugin custom query to only show the entries from Toronto. Example: show all post from city=”Toronto”.
I tried city=”Toronto” in the Custom Query box and it did not work.
I tried also to use the filter in the function.php and not look either:
add_filter(‘wmlp_query’, ‘my_custom_query_wmlp’,10,2);
function my_custom_query_wmlp($args, $shortcodeID){
if ($shortcodeID == 4){
$args[‘city’] = “Toronto”;
return $args;
}
}
First, can you please let me know what City is ? Is that post type or taxonomy ? If it is taxonomy can you please make sure its slug is city as you have mentioned ?