• Resolved ejwjohn

    (@ejwjohn)


    I have a series of posts that have a Category: when they are displayed the word CATEGORY: and the category name appears… how do i remove the word CATEGORY: please?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    for example, try to add this to functions.php of your child theme (if you don’t have a child theme, it is recommended to create one – https://codex.www.ads-software.com/Child_Themes ).

    add_filter( 'get_the_archive_title', function ($title) {
    
        if ( is_category() ) $title = single_cat_title( '', false );
    
        return $title;
    
    } );
    Thread Starter ejwjohn

    (@ejwjohn)

    Hello,

    Thank You very much, that is brilliant, i also had an issue with TAG names, so i duplicated the function and replaced CATEGORY with TAG and it seems to work fine, so a double Thank You.

    Yes i already had a Child Theme set up.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove the Name CATEGORY from post pages’ is closed to new replies.