widget_tag_cloud_args WordPress Filter Hook

The widget_tag_cloud_args hook allows you to modify the arguments that are used when generating the tag cloud widget. This can be useful if you want to change the number of tags that are displayed, or the way that the tags are sorted.

apply_filters( 'widget_tag_cloud_args', array $args, array $instance ) #

Filters the taxonomy used in the Tag Cloud widget.


Description

Top ↑

See also


Top ↑

Parameters

$args

(array)Args used for the tag cloud widget.

$instance

(array)Array of settings for the current widget.


Top ↑

More Information

By default, the following parameters are available to $args:

  • smallest – The smallest tag (lowest count) is shown at size 8
  • largest – The largest tag (highest count) is shown at size 22
  • unit – Describes ‘pt’ (point) as the font-size unit for the smallest and largest values
  • number – Displays at most 45 tags
  • format – Displays the tags in flat (separated by whitespace) style
  • separator – Displays whitespace between tags
  • orderby – Order the tags by name
  • order – Sort the tags in ASCENDING fashion
  • exclude – Exclude no tags
  • include – Include all tags
  • link – view
  • taxonomy – Use post tags for basis of cloud
  • echo – echo the results

Top ↑

Source

File: wp-includes/widgets/class-wp-widget-tag-cloud.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Added the $instance parameter.
3.0.0Added taxonomy drop-down.
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.