Site logo

Archived topic

Archive Description

3 replies · Started by Dorian on October 16, 2016

Viewing posts 1–4 of 4

Hi Tom,

I wanted to pick your brains on a Wordpress issue, not sure that it can be addressed in the theme.
I want to give my categories pages more importance and push them in search results. As such, I edited my categories and added some content.
I display a widget with the categories in the sidebar, and when I move the mouse over the category link the title of the "a" element contains the whole description of the cat. Is there any way to change that title to something meaningful and nice looking?

Thanks,

Dorian

Hi Dorian,

Which widget are you using? The default category widget?

I did a quick search and found this function:

// prevent the category widget from using the category description as the list item title attribute
function sjc_disable_cat_desc_widget_list_titles ( $cat_args ) {
    $cat_args[ 'use_desc_for_title' ] = 0;
    return $cat_args;
}
add_filter( 'widget_categories_args', 'sjc_disable_cat_desc_widget_list_titles' );

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

Let me know :)

Hi Tom,

I used your plugin, very elegant solution...
Thanks a bunch, that did it.

Cheers,

Dorian

Glad I could help :)

This archived topic is closed to new replies.