• Resolved divamaggie

    (@divamaggie)


    How do I change the font size of the default tags in 2.5. When I add the same tag twice the font becomes so large it runs off the sidebar.

Viewing 13 replies - 1 through 13 (of 13 total)
  • use a php widget and insert
    <?php wp_tag_cloud('smallest=1&largest=9&'); ?>

    font size numbers are in pt, adjust as necessary.

    Thread Starter divamaggie

    (@divamaggie)

    Is there any way to adjust the sizes in the default tag cloud widget that comes with 2.5?

    Thread Starter divamaggie

    (@divamaggie)

    I mean this has to be one of the easiest questions asked in the forum. Someone must know which file I have to edit no?

    Thread Starter divamaggie

    (@divamaggie)

    Does anyone know how to adjust the font sizes for the default tag cloud widget in 2.5?

    Using Wingrep found that the Template Tag wp_tag_cloud() reference you are looking for is in wp-includes/widgets.php.

    Thread Starter divamaggie

    (@divamaggie)

    So would it have something to do with this line in wp-includes/widgets.php?

    <?php _e(‘Title:’) ?> <input type=”text” class=”widefat” id=”tag-cloud-title” name=”tag-cloud-title” value=”<?php echo $title ?>” /></label>

    I believe it would have to do the line that that acutally references wp_tag_cloud(). Look at the Codex article link I provided to add parameters to do what you want with the sizing.

    Other resources:
    Editing Files

    Please make a backup of core files before you modify such files.

    Note: I’m assuming you want to change the size of the tag cloud entries so look at some of the example in that article.

    Thread Starter divamaggie

    (@divamaggie)

    The only line in wp-includes/widget.php that references wp_tag_cloud is second from the bottom

    function wp_widget_tag_cloud($args) {
    extract($args);
    $options = get_option(‘widget_tag_cloud’);
    $title = empty($options[‘title’]) ? __(‘Tags’) : $options[‘title’];

    echo $before_widget;
    echo $before_title . $title . $after_title;
    wp_tag_cloud();
    echo $after_widget;
    }

    Yes that is the line you will want to change.

    I should also point out, modifying core files is not recommended and as such carries a risk.

    Please make the appropriate backup and remember you may need to make changes in future WordPress versions.

    Thread Starter divamaggie

    (@divamaggie)

    So I would change the line from

    wp-tag_cloud();

    to

    wp_tag_cloud(‘smallest=1&largest=9&’)

    I’ll say yes to that, but only you can be the judge of the correct values for those settings.

    Also don’t really need the trailing & but don’t think it hurts.

    Thread Starter divamaggie

    (@divamaggie)

    Thank you so much for helping me with this Michael! It worked!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘default tags in 2.5’ is closed to new replies.