[Resolved] Archive Description

Home Forums Support [Resolved] Archive Description

Home Forums Support Archive Description

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #235821
    Dorian

    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

    I love coffee and blogging.

    #235862
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #236011
    Dorian

    Hi Tom,

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

    Cheers,

    Dorian

    I love coffee and blogging.

    #236016
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.