Support » Fixing WordPress » Bug or feature? Category description in every page increases page size!!

  • Today I found out that every page of my site contains the description of each category. Luckily I created the description for only one category (you can do this going into post->categories->edit single category).
    WordPress shows an on hover text when going over the category links, but the size of the pages is much increased if you have long descriptions!! Is there a way to turn off this behaviour and have the category description only in the category itself? You can see what I’m talking about going to http://www.justthink.it and going, on the right, over the SEO category.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • this is a feature of the ‘Categories’ widget which uses the function wp_list_categories() with some of the default parameters;

    ‘use_desc_for_title’
    (bool|int) Whether to use the category description as the title attribute. Default 1.

    https://developer.wordpress.org/reference/functions/wp_list_categories/#parameters

    it can be remedied by adding a filter function into functions.php of your (child) theme:

    filter for removing the output of the category description as title attributes in the ‘Categories’ widget:

    add_filter('widget_categories_args','remove_cat_description_widget');
    function remove_cat_description_widget($args) {
    $args['use_desc_for_title'] = 0;
    return $args;
    }

    It worked, thanks, however it would be nice to have a small description field to be used for titles and a full description for the description in the category pages…
    Do you know where I can propose this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug or feature? Category description in every page increases page size!!’ is closed to new replies.