Thanks for your post,
There is a filter hook you can filter query arguments,
here is the documentation
https://pickplugins.com/docs/documentation/post-grid/filter-hooks/filters-post_grid_filter_query_args/
I have this code, but I can not filter by tag //Sorry not category
function post_grid_filter_query_args_extra($query_args){
$cu = wp_get_current_user(); //usuario actual
$valorC=xprofile_get_field_data('Ciudad',$cu->ID); //city tag, i used BuddyP.
$extra_query = array (
'post__not_in' => array('tag' => $valorC),
);
return array_merge($query_args, $extra_query);
}
add_filter('post_grid_filter_query_args','post_grid_filter_query_args_extra');
-
This reply was modified 8 years, 7 months ago by
massimo_oddo.
-
This reply was modified 8 years, 7 months ago by
massimo_oddo.
Thank you, I have succeeded.