• I am making some modifications to my tagcloud widget on my wordpress site. My goal is to generate a regular list of tags that have currently been used (most popular on top).

    I have added some entries to my functions page as follows:

    function custom_tag_cloud_widget($args) {
    $args[‘number’] = 0; //adding a 0 will display all tags
    $args[‘largest’] = 16; //largest tag
    $args[‘smallest’] = 16; //smallest tag
    $args[‘unit’] = ‘px’; //tag font unit
    $args[‘format’] = ‘list’; //ul with a class of wp-tag-cloud
    $args[‘orderby’] = ‘count’; //change list order by popularity
    return $args;
    }
    add_filter( ‘widget_tag_cloud_args’, ‘custom_tag_cloud_widget’ );

    Everything is working except the orderby argument

    For whatever reason it acts like it’s not there (the widget still loads my links in alphabetical order instead of by number of times tag has been used)

    Can someone help me as to why this isn’t working?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • @scheric1, I can’t but you may be able to answer my question. I want to edit the font size for my tags which will show up on my sideboard under my widgets.

    I went to my function page, I see the widget programming, look below – where do I put your entry to get same size fonts of my cloud tags? Help and thanks:)

    [ Code moderated. For more than 10 lines of code please use pastebin.com instead. ]

    Thread Starter scheric1

    (@scheric1)

    simply paste that function under the other function already in your functions.php file

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress tagcloud arguments’ is closed to new replies.