I am using this code in my functions as I am trying to exclude the current post from the grid plugin.
function current_post_tgfilter($args) {
$args['post__not_in'] = array (get_the_ID());
return $args;
}
add_filter('tg_wp_query_args', 'current_post_tgfilter', 10, 2);
However, this doesn’t work as expected. Am I doing something wrong here?
many thanks,
Andrew