Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_filter( 'widget_tag_cloud_args', 'jmw_exclude_tag_from_tag_cloud');
function jmw_exclude_tag_from_tag_cloud( $args ) {
$args[ 'exclude' ] = '36'; // ID of the tag. If multiple tags use comma delimited sting '2,5,36'
return $args;
}
/*
* Other arguments that can be changed
* 'smallest' => 8,
* 'largest' => 22,
* 'unit' => 'pt',
* 'number' => 45,
* 'format' => 'flat',
* 'separator' => "\n",
* 'orderby' => 'name',
* 'order' => 'ASC',
* 'exclude' => null,
* 'include' => null,
* 'topic_count_text_callback' => default_topic_count_text,
* 'link' => 'view',
* 'taxonomy' => 'post_tag',
* 'echo' => true,
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.