WordPress.org

Ready to get started?Download WordPress

Forums

howto edit tag cloud font sizes? (8 posts)

  1. joeybutterface
    Member
    Posted 6 years ago #

    Hello,

    Does anyone know how I can edit the sizes of the fonts the tag cloud uses?

    For example:
    <a href='URL' class='tag-link-1' title='6 topics' rel="tag" style='font-size: 22pt;'>The Tag</a>

    The "22 pt" font breaks the sidebar in my design. I want to make it much smaller. How do I do that?

    I'm using the tag cloud widget btw.

  2. MichaelH
    Member
    Posted 6 years ago #

    Guess you could edit wp-includes/widgets.php and where it uses the Template Tag, wp_tag_cloud(), add the smallest, largest, and unit parameters to meet your needs.

  3. pablogt
    Member
    Posted 6 years ago #

    how..
    I tryed this and did not work... any suggestions

    echo $before_widget;
    echo $before_title . $title . $after_title;
    wp_tag_cloud('smallest 10px; largest 14px');
    echo $after_widget;

  4. pablogt
    Member
    Posted 6 years ago #

    this worked for me

    wp_tag_cloud('smallest=10&largest=16&number=45&orderby=name&format=flat');

  5. liveforever
    Member
    Posted 6 years ago #

    Thanks guys - thanks to you I have fixed my rather tragic tag cloud - using the last method above.
    - Robin

  6. sing2zing
    Member
    Posted 6 years ago #

    What file am I editing with this method? I am using the Tag Cloud widget I believe came with WP and I want to change the font sizes. Tag Cloud is not listed on my plugins page therefore there is not a php file listed under the plugin editor for me to change. Under Theme Editor I also do not see the file to edit. To make Tag Cloud work I have just added Tag Cloud onto my sidebar under the Design Widgets tab and it works but has not option on this page either. Thanks.

  7. nchenga
    Member
    Posted 5 years ago #

    where do i change the font size if i'm using the default WP Tag Cloud widget?

    wp 2.6.1

  8. dtwilliamson
    Member
    Posted 5 years ago #

    To change the font sizes, edit wp-includes/widgets.php using information found at:

    wp_tag_cloud

    basically, you want this:

    wp_tag_cloud('smallest=8&largest=22');

    substituting the sizes you want.

Topic Closed

This topic has been closed to new replies.

About this Topic