New Landing How can we help? Themeforest Theme Support Uplift Dates showing in Google SERP, for Posts but not Pages

Tagged: , , , , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Uplift
  • #289670
    mhote
    Member
    Post count: 394

    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

    #289852
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    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.

    #289866
    mhote
    Member
    Post count: 394

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

    #289872
    David Martin – Support
    Moderator
    Post count: 20834

    Ah yes, a plugin like that would also explain it. Perfect, glad you got it sorted.

    – David.

    #291321
    mhote
    Member
    Post count: 394

    Hi 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>
    #291598
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

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

    #291725
    mhote
    Member
    Post count: 394

    Cheers Ed.

    #292220
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    No problem!

    – Ed

    #311098
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #311336
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @mhote

    I just adjusted the code for the next update, so that this is not output if you have remove dates enabled.

    Thanks,

    – Ed

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register