Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Uplift › Dates showing in Google SERP, for Posts but not Pages
New Landing › How can we help? › Themeforest Theme Support › Uplift › Dates showing in Google SERP, for Posts but not Pages
- This topic has 9 replies, 3 voices, and was last updated 7 years by Swift Ideas – Ed.
-
Posted in: Uplift
-
August 29, 2016 at 2:03 pm #289670
Hi, trying to eliminate dates from showing anywhere in Google SERPS
Similar to this, http://www.swiftideas.com/forums/topic/remove-date-in-google-snippets/
Have added that code and also ticked ‘remove post dates’ in settings
But still showing.
How can we once and for all stop dates showing? Thanks
August 30, 2016 at 12:29 pm #289852Hi,
Google will remove the dates from it’s index when it next crawls your URL and updates its index – assuming you have removed the code that provides Google the date data.
Thanks,
David.August 30, 2016 at 1:07 pm #289866Thanks David. After much review, it seems the code was coming from Yoast SEO Plugin, not the theme.
For anyone with this problem, follow this: https://wordpress.org/support/topic/remove-yoast-date-meta-articlepublished_time
Add the below to child theme functions.php
add_filter( 'wpseo_og_article_published_time', '__return_false' ); add_filter( 'wpseo_og_article_modified_time', '__return_false' ); add_filter( 'wpseo_og_og_updated_time', '__return_false' );
Then view page source code and these 3 elements will be gone.
August 30, 2016 at 1:37 pm #289872Ah yes, a plugin like that would also explain it. Perfect, glad you got it sorted.
– David.
September 10, 2016 at 12:16 am #291321Hi SwiftIdeas, is the theme somehow displaying the ‘date updated’, as we’ve added above code to return false on those parameters, but it’s still showing?
<header class="article-heading hidden-hatom"> <div class="container"> <div class="entry-title" itemprop="name">BLOG TITLE HERE</div> <span class="date updated">May 11, 2016</span> <span class="vcard author"> <span class="fn">NAME HERE</span> </span> </div> </header>
September 13, 2016 at 12:45 am #291598Yes, we have fixed that for the update next week. You can override this function if you want to now:
/* POST DETAIL HEADING ================================================== */ if ( ! function_exists( 'sf_post_detail_heading' ) ) { function sf_post_detail_heading() { global $post; ?> <header class="article-heading hidden-hatom"> <div class="container"> <div class="entry-title" itemprop="name"><?php the_title(); ?></div> <span class="date updated"><?php the_date(); ?></span> <span class="vcard author"> <span class="fn"><?php the_author_meta( 'display_name' ); ?></span> </span> </div> </header> <?php } } add_action( 'sf_post_article_start', 'sf_post_detail_heading', 10 );
– Ed
September 14, 2016 at 2:46 am #291725Cheers Ed.
September 16, 2016 at 6:27 pm #292220No problem!
– Ed
January 23, 2017 at 1:01 am #311098This reply has been marked as private.January 25, 2017 at 4:03 am #311336Hi @mhote
I just adjusted the code for the next update, so that this is not output if you have remove dates enabled.
Thanks,
– Ed
-
Posted in: Uplift
You must be logged in and have valid license to reply to this topic.