-
AuthorPosts
-
June 6, 2019 at 4:20 pm #1107985
Having a 2012 date in search engines results is not good. How can I remove them from appearing in google results?
Thanks.
June 6, 2019 at 4:54 pm #1107997Hey,
Please try using a plugin such as this one – https://wordpress.org/plugins/wp-meta-and-date-remover/
Regards,
YigitJune 7, 2019 at 12:47 pm #1108250That removes everything.
I need to remove dates from enfold itself, so posts have no date in search results.
How can I do that?
Thanks.
June 7, 2019 at 4:51 pm #1108288Hi,
If you are just after the dates that appear on the search page and in the Ajax search you can hide them using css.
.search .post-meta-infos { display: none!important; }
That should hide the meta info on the search page only. It will remain on blogs and blog elements.
.header_color .ajax_search_excerpt { display:none; }
That will remove the info from the Ajax search
In order to remove them from the site completely you’ll need to edit some of the php files (I’ll get back to you soon over which ones) you could just change the “published” date in the backend to make them appear newer.
Hope that helps
TJ
- This reply was modified 5 years, 5 months ago by tjswarbs78.
June 8, 2019 at 9:21 am #1108420Thank you TJ, but I need this for search engine results as title says. Google, etc…
June 10, 2019 at 12:47 pm #1108805Hi,
If you are using Yoast please see this post
One issue that you may find is that Google will post any date it finds on the page and use it as the post date. The link above also has some links to some plugins that may work for you.Best regards,
MikeJune 14, 2019 at 10:50 am #1110271Not using Yoast. I tried WP Date Remover with no success.
Maybe it is easier to remove the date from Enfold itself? That way there is no date and that’s it.
Any suggestions? I really need to remove dates from search engines results.
Thanks.
June 14, 2019 at 1:36 pm #1110316Hi,
Try adding this code to the end of your functions.php file in Appearance > Editor:function jl_remove_post_dates() { add_filter('the_date', '__return_false'); add_filter('the_time', '__return_false'); add_filter('the_modified_date', '__return_false'); add_filter('get_the_date', '__return_false'); add_filter('get_the_time', '__return_false'); add_filter('get_the_modified_date', '__return_false'); } add_action('loop_start', 'jl_remove_post_dates');
Best regards,
MikeJune 27, 2019 at 9:17 am #1113833Not working. Any other approach?
Thanks.
June 28, 2019 at 4:26 am #1114152Hi,
Do you mean that this doesn’t remove the date from the page, or that the date is still showing in Google?
Please include an admin login in the Private Content area so we can investigate.Best regards,
MikeJune 29, 2019 at 10:06 am #1114408It is still showing in search engine results. That is what I want to fix.
Thanks.
June 29, 2019 at 5:10 pm #1114464Hi,
Yes I understand that you wish to remove this from the search results, but first, we need to remove the date from the page.
But as we don’t have a link to your site I can’t confirm that this is true.I assume that you understand that Google search results are cached and may take a few days to correct. I have also seen that Google will find any date on your site and will post that as the “post date” which is often wrong.
Please link to your page and to the search results you found so we can examine.
Best regards,
MikeJune 29, 2019 at 8:46 pm #1114519Yes I understand that you wish to remove this from the search results, but first, we need to remove the date from the page.
The single post are not showing date for a really long time.
But as we don’t have a link to your site I can’t confirm that this is true.
It is true, the date is not showing in posts.
I assume that you understand that Google search results are cached and may take a few days to correct.
Yes, google take time, I updated some posts, the results now show with the new added content, but still showing the date.
I have also seen that Google will find any date on your site and will post that as the “post date” which is often wrong.
It is showing the exact post date.
Please link to your page and to the search results you found so we can examine.
Sure, but as stated and asked one June 6, I need to remove dates from Enfold itself and for some reason unchecking the option in blog layout only hides it, but not for Google.
So that is what I still need. Remove date from search engines results.
Thank you.
June 30, 2019 at 5:40 pm #1114622Hi,
Thanks for the feedback, the date is in your “structured-data” Please try going to Enfold Theme Options > Layout Builder > Automated Schema.org HTML Markup and disabling.
It is also showing in your header asmeta property="article:published_time"
which I believe is from an seo plugin because it’s not in our demos, please check and deactavate.
Best regards,
MikeJune 30, 2019 at 5:53 pm #1114628I am not looking to remove Automated Schema, I am looking to remove the date, nothing else. I want to keep everything as it is right now and remove JUST the dates from Enfold.
Are you really sure
meta property="article:published_time"
is not from Enfold?Because my SEO plugin will only add the date to the OG tags that are used when sharing to social media.
Thank you Mike.
June 30, 2019 at 7:51 pm #1114667Hi,
Yes I sure that this not from Enfold, this is all of the dates in your header:<meta property="article:published_time" content="2012-02-21T13:48:40+00:00"> <meta property="article:modified_time" content="2019-06-30T17:10:27+00:00"> <meta property="og:updated_time" content="2019-06-30T17:10:27+00:00">
To remove the structured-data datePublished from the post please try editing:
\enfold\includes\helper-markup.php
starting about line 372 look for:if( !in_array('date', $exclude) ) { $output .= "<span class='av-structured-data' {$entry_time_markup}>{$post->post_date}</span>"; } if( !in_array('date_modified', $exclude) ) { $output .= "<span class='av-structured-data' {$date_markup}>{$post->post_modified}</span>"; }
and comment out like this:
/*if( !in_array('date', $exclude) ) { $output .= "<span class='av-structured-data' {$entry_time_markup}>{$post->post_date}</span>"; } if( !in_array('date_modified', $exclude) ) { $output .= "<span class='av-structured-data' {$date_markup}>{$post->post_modified}</span>"; }*/
Best regards,
MikeJune 30, 2019 at 7:53 pm #1114669Yes I sure that this not from Enfold, this is all of the dates in your header
Then I will continue testing to see where is Google using the dates from.
Thank you Mike.
June 30, 2019 at 8:11 pm #1114675Hi,
The structured-data datePublished is from Enfold, did you find the edit above removes it?Best regards,
MikeJune 30, 2019 at 8:15 pm #1114680Thank you Mike.
If it is not appearing in the code and everything comes from another place, then there is no need to modify Enfold.
I am doing some test to see if that SEO OG is the one affecting this.
<meta property="article:published_time" content="2012-02-21T13:48:40+00:00"> <meta property="article:modified_time" content="2019-06-30T17:10:27+00:00"> <meta property="og:updated_time" content="2019-06-30T17:10:27+00:00">
It seems that comes from the SEO plugin and that is what Google is using, will have to confirm, check, test and then reply here.
June 30, 2019 at 9:05 pm #1114704Hi,
Sorry, I don’t think I was very clear. The “meta property” in the header is one place the date shows
But the date also shows lower in the page because of the “helper-markup.php” file
So it is in two places.Best regards,
MikeJune 30, 2019 at 9:18 pm #1114710I see, you refer to:
<span class="av-structured-data" itemprop="datePublished" datetime="">2012-03-08 14:33:19</span>
I will give that a try and report back in a few days.
Thank you.
June 30, 2019 at 10:57 pm #1114723July 4, 2020 at 2:40 pm #1227922Hi,
In a follow-up question in another thread you asked:Is there a way to achieve this without having to modify core files?
Maybe a function?Unfortunately, there is not a function to remove the
datePublished
from the theme’s structured data, but you can use the solution above in your child theme by creating an/includes/
directory in your child theme and adding your modifiedhelper-markup.php
file, and then add this to your child theme functions.phprequire_once( 'includes/helper-markup.php' );
I have tested this on a new install with a child theme and it works correctly.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.