This WordPress function requires the CPT-onomy class.


Displays a list of CPT-onomy terms in what is called a ‘tag cloud’, where the size of each term name is determined by how many times that particular term has been assigned to posts.

Note: CPT-onomies includes a tag cloud widget for your sidebar.


$cpt_onomy->wp_tag_cloud( 						string|array


$args (string|array) (optional)
Default: none
Arguments to customize what data is returned.
For information on how to customize the $args parameter, refer to the WordPress codex.

Return Values

(array|html) Generated tag cloud, only if no failures and 'array' is set for the 'format' argument or the 'echo' argument is set to false. Otherwise, will echo the tag cloud.


Display a CPT-onomy Cloud:

global $cpt_onomy;
$cpt_onomy->wp_tag_cloud( array( 'taxonomy' => 'actors' ) );

Cloud returned as array but not displayed:

global $cpt_onomy;
$cpt_onomy->wp_tag_cloud( array( 'taxonomy' => 'actors', 'format' => 'array' ) );

Cloud ordered by count rather than name:

global $cpt_onomy;
$cpt_onomy->wp_tag_cloud( array( 'taxonomy' => 'actors', 'orderby' => 'count' ) );

WordPress Codex

For more information, refer to the WordPress codex.