• Resolved Maggie96

    (@maggie96)


    Hi,

    I’m using the Virtue Child Theme.

    I am trying to remove the word “Archives” from the title of posts when they show up in Google Search. See in the Google Search list “Cutting Boards Archives – I Read Labels For you” (Sorry – it wouldn’t let me upload a screenshot.)

    When you click into the post – the word “Archives” isn’t actually in/on the post or on the tab in the browser. But it keeps showing up in Google Search. These posts are receiving updates as we move forward – but the word “Archives” leads people to believe they’re old.

    I have added this code to the functions.php file (I’ve also gone into the Yoast SEO plugin and removed all instances of “Archives” from the Yoast settings).

    function my_theme_archive_title( $title ) {
    if ( is_category() ) {
    $title = single_cat_title( ”, false );
    } elseif ( is_post_type_archive() ) {
    $title = post_type_archive_title( ”, false );
    }

    return $title;
    }

    add_filter( ‘get_the_archive_title’, ‘my_theme_archive_title’ );

    But the word “Archives” continues to show up even after clearing all caches. Because I’m working with the child theme – I’m a bit stumped – for instance, there’s no archives.php or a header.php folder in the files that I can search through to see if this title is in there somewhere. (I keep thinking that would be the next step?)

    Sorry if this sounds a bit crazy. lol. Would you be able to tell me where to find and delete the word “Archives” so it isn’t showing up in a search?

    Thank you ??

    Meagan

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • hannah

    (@hannahritner)

    Hi Meagan,
    I’m not seeing the word “Archives” in the google search you linked to. Are you still seeing it? It can take a bit for all the cache to clear. If you edited this in Yoast you should be set. But let me know if Archives is still showing in the search for you.

    Hannah

    Thread Starter Maggie96

    (@maggie96)

    Hi Hannah,

    Yes – I’ve gotten feedback from testers and it worked! Thank you!!

    Meagan

    Thread Starter Maggie96

    (@maggie96)

    Hi –

    I’m still having issues with the original post date – and the word “Archives” showing up in Search results.

    I added code to show Last Updated Date.

    I also followed your advice to add code to remove the word “Archives” from Search results.

    The original date and the word “Archives” do not show up when you click into a blog post. But they still show in SERPs. And that’s the problem. (See my attached link to a page I brought up doing a search). Clients see the original post date (not the Last Updated Date) as well as the word “Archives” – and they don’t click to read the posts.

    https://www.google.com/search?q=wood+cutting+boards++ireadlabelsforyou.com&oq=wood+cutting+boards++ireadlabelsforyou.com&gs_l=psy-ab.3..35i39k1.14194.19504.0.19711.23.23.0.0.0.0.147.2104.13j8.21.0….0…1.1.64.psy-ab..2.21.2101…0j0i22i30k1j0i8i13i30k1.0.7h4NdnMhghA

    We are using the Virtue Child Theme. (I’ve removed Archives from the Yoast SEO plugin but that doesn’t seem to help.)

    The Virtue Child theme has only a few files. A functions.php file, a Landing Page Template, and a style.css file.

      Listed below are the code snippets I’ve added to the functions.php file.

      //Code to add Last Updated Date to Irina’s Blog Posts

    function wpb_last_updated_date( $content ) {
    $u_time = get_the_time(‘U’);
    $u_modified_time = get_the_modified_time(‘U’);
    if ($u_modified_time >= $u_time + 86400) {
    $updated_date = get_the_modified_time(‘F jS, Y’);
    $updated_time = get_the_modified_time(‘h:i a’);
    $custom_content .= ‘<p class=”last-updated”>Last updated on ‘. $updated_date . ‘ at ‘. $updated_time .'</p>’;
    }

    $custom_content .= $content;
    return $custom_content;
    }
    add_filter( ‘the_content’, ‘wpb_last_updated_date’ );

      //Code to remove the word Archives from blog post title in Google Search

    function my_theme_archive_title( $title ) {
    if ( is_category() ) {
    $title = single_cat_title( ”, false );
    } elseif ( is_post_type_archive() ) {
    $title = post_type_archive_title( ”, false );
    }

    return $title;
    }

    add_filter( ‘get_the_archive_title’, ‘my_theme_archive_title’ );

      //Code to remove blog post date from SERPS

    remove_action(‘kadence_single_post_before_header’, ‘virtue_single_post_meta_date’, 20);
    remove_action(‘virtue_single_post_before_header’, ‘virtue_single_post_meta_date’, 20);

    Would you have any other suggestions I can try to remove the word “Archives” and to not show original post date but Last Updated Date in search results?

    Thank you,

    Meagan

    hannah

    (@hannahritner)

    Hey,
    I’m not seeing the word “Archives” in the SERP. Have you cleared your cache?

    Hannah

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove “Archives” from blog post title search results’ is closed to new replies.