I am using this code in an attempt to exclude certain tags from a tag cloud widget block that I have on my GP sidebar element:
add_filter( 'widget_tag_cloud_args', 'gm_exclude_tag_from_tag_cloud');
function gm_exclude_tag_from_tag_cloud( $args ) {
$args[ 'exclude' ] = '46,42,48,43,49,47,50';
return $args;
}
It doesn’t seem to work. I suspect it’s because I use a tag cloud block and not an actual WordPress widget. Is there a solution?