A
A
Alexander Osadchy2020-07-06 23:03:09
WordPress
Alexander Osadchy, 2020-07-06 23:03:09

How can I remove the word "Categories" here?

This is mysticism, I dug everything up - there is no such word in the templates (- you should simply display "2017"
5f0383ede5b92768422206.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Osadchiy, 2020-07-06
@DELUX

Here it helped (in functions.php)

function my_theme_archive_title( $title ) {
    if ( is_category() ) {
        $title = single_cat_title( '', false );
    } elseif ( is_tag() ) {
        $title = single_tag_title( '', false );
    } elseif ( is_author() ) {
        $title = '<span class="vcard">' . get_the_author() . '</span>';
    } elseif ( is_post_type_archive() ) {
        $title = post_type_archive_title( '', false );
    } elseif ( is_tax() ) {
        $title = single_term_title( '', false );
    }

    return $title;
}

add_filter( 'get_the_archive_title', 'my_theme_archive_title' );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question