Home Forums Pro Themes Realestate Base Pro Change Page Header "Archives:"

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #108972
    Robyn Pearson
    Participant

    Where do I change the text in the header that says “Archives:” as a result of searching. I’d like to change it to say something else or just delete it all together.

    #109090
    wensolutions
    Keymaster

    Hello,

    To remove the archive, you have to add the custom code in your child theme functions.php file.

    To know how you can create and activate the child theme refer to below given link:

    https://wptravel.io/how-to-create-a-child-theme/

    Now after the activation of the child theme, add below given code in your child theme functions.php file.

    function realestate_child_remove_cat_titles($title) {
        if ( is_archive() ) {
    
            $title = single_cat_title( '', false );
    
        } elseif ( is_tag() ) {
    
            $title = single_tag_title( '', false );
    
        } elseif ( is_author() ) {
    
            $title = '<span class="vcard">' . get_the_author() . '</span>' ;
        }
        return $title;
    }
    add_filter( 'get_the_archive_title', 'realestate_child_remove_cat_titles' );

    Hope this helps.

    Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.