wp_tag_cloud()

This WordPress function requires the CPT-onomy class.

Description

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.

Usage

$cpt_onomy->wp_tag_cloud( 						string|array
						$args
						 );

Parameters

$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.

Examples

Display a CPT-onomy Cloud:

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

Cloud returned as array but not displayed:

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

Cloud ordered by count rather than name:

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

WordPress Codex

For more information, refer to the WordPress codex.