WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to alter the default widget to display a tag cloud of a custom taxonomy?

share|improve this question
up vote 4 down vote accepted

Don't know of any but you can easily create your own:

add_action("widgets_init", array('Widget_Custom_tax_tag_cloud', 'register'));
class Widget_Custom_tax_tag_cloud {
    function control(){
        echo 'No control panel';
    function widget($args){
        echo $args['before_widget'];
        echo $args['before_title'] . 'Your widget title' . $args['after_title'];
        $cloud_args = array('taxonomy' => 'Your taxonomy here');
        wp_tag_cloud( $cloud_args ); 
        echo $args['after_widget'];
    function register(){
        register_sidebar_widget('Widget name', array('Widget_Custom_tax_tag_cloud', 'widget'));
        register_widget_control('Widget name', array('Widget_Custom_tax_tag_cloud', 'control'));

just change : 'Your widget title' with your title and Your 'taxonomy here' with the name of your taxonomy.

you can change the look and feel by passing more arguments in the $cloud_args from the large list in the codex

Hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.