Examples of using the PHP output

This post demonstrates the use of the PHP API to retrieve information about tag groups and associated tags.

Description

Use the function tag_groups_cloud to obtain the html of the tabbed tag cloud as string. With the second parameter set to true, this function returns an array of groups and tags.

Options

The parameters are largely the same as for the shortcode.

Code

echo tag_groups_cloud( array() );

Output

[tag_groups_cloud_shortcode]

Code

print_r( tag_groups_cloud(array(), true ) );

Output

[tag_groups_cloud_shortcode return_array=1]