Skip to content

Instantly share code, notes, and snippets.

@calliaweb
Last active July 27, 2016 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calliaweb/41c66edf31f63ceedcb7a50f263f12c1 to your computer and use it in GitHub Desktop.
Save calliaweb/41c66edf31f63ceedcb7a50f263f12c1 to your computer and use it in GitHub Desktop.
<?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