• Hello,

    On my Services page, the title has Archives: Services. I just want it to say Services. How do I remove “Archives:”?

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

Viewing 1 replies (of 1 total)
  • Hello there,

    Try adding this PHP snippet into a child theme’s functions.

    
    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' );
    

    If you haven’t yet been running any child theme, you could use Code Snippets plugin.

    Regards,
    Kharis

Viewing 1 replies (of 1 total)
  • The topic ‘Remove text “Archives:” from Services page’ is closed to new replies.