Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1107985

    Having a 2012 date in search engines results is not good. How can I remove them from appearing in google results?

    Thanks.

    #1107997

    Hey,

    Please try using a plugin such as this one – https://wordpress.org/plugins/wp-meta-and-date-remover/

    Regards,
    Yigit

    #1108250

    That removes everything.

    I need to remove dates from enfold itself, so posts have no date in search results.

    How can I do that?

    Thanks.

    #1108288

    Hi,

    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, 6 months ago by tjswarbs78.
    #1108420

    Thank you TJ, but I need this for search engine results as title says. Google, etc…

    #1108805

    Hi,
    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,
    Mike

    #1110271

    Not 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.

    #1110316

    Hi,
    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,
    Mike

    #1113833

    Not working. Any other approach?

    Thanks.

    #1114152

    Hi,
    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,
    Mike

    #1114408

    It is still showing in search engine results. That is what I want to fix.

    Thanks.

    #1114464

    Hi,
    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,
    Mike

    #1114519

    Yes 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.

    #1114622

    Hi,
    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 as

    meta 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,
    Mike

    #1114628

    I 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.

    #1114667

    Hi,
    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,
    Mike

    #1114669

    Yes 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.

    #1114675

    Hi,
    The structured-data datePublished is from Enfold, did you find the edit above removes it?

    Best regards,
    Mike

    #1114680

    Thank 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.

    #1114704

    Hi,
    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,
    Mike

    #1114710

    I 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.

    #1114723

    Hi,
    We look forward to your results.

    Best regards,
    Mike

    #1227922

    Hi,
    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 modified helper-markup.php file, and then add this to your child theme functions.php require_once( 'includes/helper-markup.php' );
    I have tested this on a new install with a child theme and it works correctly.

    Best regards,
    Mike

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