Remove “Archives” from blog post title search results
-
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]
- The topic ‘Remove “Archives” from blog post title search results’ is closed to new replies.