Skip to:
Content
Pages
Categories
Search
Top
Bottom

Tags for forum in sidebar are exceeding width of sidebar

  • Avatar of nickharambee
    nickharambee
    Participant

    @nickharambee

    Hi,

    I have just started developing a new site and added a couple of topics to the forum. Tags show up in the sidebar when I am on the forum directory page, but the size of one of the tags (font-size:42px) is exceeding the width of the sidebar as you can see in this image.

    How can I fix this issue?

    Thanks,

    Nick

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Tammie Lister
    karmatosed
    Moderator

    @karmatosed

    It’s a little hard to tell with a link when you’ve done something custom. However, my suggestion would be to set a width limit on the side bar or if you have one then look using CSS to decrease that font size – one thing has to go down or up to fit from what I’m seeing :)

    Avatar of nickharambee
    nickharambee
    Participant

    @nickharambee

    Thanks. The only thing I have customised that I think would affect this is reducing the width of the sidebar to 198px from 224px. For some reason the tag cloud generated by sidebar.php isn’t respecting the CSS width of the sidebar. I am not sure how the font-sizes for tags are generated. They are set using an inline style tag, so there is no CSS class to override.

    Avatar of Chouf1
    Chouf1
    Participant

    @chouf1

    See if this goes to your convenience.

    Forum Tags
    Add this filter to your child theme function.php
    Cloud font values are set by default to 10 and 42.Seted to 10 and 30

    `remove_filter (‘bp_forums_tag_heat_map’,'bp_forums_tag_heat_map’);
    function my_bp_forums_tag_heat_map( $args = ” ) {
    $defaults = array(
    ‘smallest’ => ’10′,
    ‘largest’ => ’30′,
    ‘sizing’ => ‘px’,
    ‘limit’ => ’30′
    );

    $r = wp_parse_args( $args, $defaults );
    extract( $r, EXTR_SKIP );

    bb_tag_heat_map( $smallest, $largest, $sizing, $limit );
    }
    add_filter (‘bp_forums_tag_heat_map’,'my_bp_forums_tag_heat_map’);`

    Also in functions.php
    WP Tag Cloud defined in wp-includes/category-template.php
    `add_filter( ‘widget_tag_cloud_args’, my_tag_cloud_args );
    function my_tag_cloud_args($in){
    return ‘smallest=10&largest=12&number=25&orderby=name&unit=px’;
    }`

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.