Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #349159

    Hi guys!!

    What can I do to not have the dates appear on the Google snippets? It used to work by not displaying the dates on Enfold and on the Yoast SEO plugin but now they appear on the search results.

    Is there some code I can add to remove the meta date?

    Thank you!!!

    Havi
    http://hispanic-marketing.com/ if you need it :)

    #349479

    Hi havi!

    Try opening up /enfold/includes/loop-index.php and find line 134.

    echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>";
    

    And change it to this.

    //echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>";
    

    If you want to do this in a child theme then copy the file over to your child theme and then do the edit. This will remove the date meta from your single posts.

    Best regards,
    Elliott

    • This reply was modified 10 years ago by Elliott.
    #349548

    Thank you, Elliot!! I don’t have a child theme so I went via the editor to the loop-index.php but then I noticed both instructions you sent me are identical. Is this correct?

    Havi
    PS: Should I have a child theme or will it be incorporated on a future release? (hoping it’s the latter) :)

    #349549

    Sorry I just noticed that you commented that out!! :)

    #349551

    Should I also comment out this one?

    echo “<span class=’text-sep text-sep-date’>/</span>”;

    #349571

    Elliot,
    Now the date and number of comments displays on these pages:

    http://hispanic-marketing.com/hispanic-culture/

    and I have it marked up as do not display only author and category should display.and it’s doing the opposite. Any suggestions?

    Also, the date displays on the home page grid:
    http://hispanic-marketing.com

    I also changed the look from Grid to Single Author, big preview on http://hispanic-marketing.com/social-media/ and it doesn’t display the date and comments but when I choose not to display the pagination, it does not display the “Load More” How can I have it display the Load More button?

    #350050

    Hi!

    Try adding this to your custom CSS.

    .slide-meta { display: none !important; }
    

    The blog posts do not have a load more option so I’m not sure what you mean there. Our masonry shortcode has a load more option. Is that what your referring to? If so then you will need to select between one or the other. It wouldn’t be feasible to use both at the same time.

    Cheers!
    Elliott

    • This reply was modified 10 years ago by Elliott.
    #350290

    Thank you, Elliott!!! :) You guys are awesome!!

    Yes, I was referring to that button.. no problem I can leave the pagination (I love the load more button, maybe next release will also give that option? It would be awesome..)

    I only have one more date showing on these pages:
    http://hispanic-marketing.com
    http://hispanic-marketing.com/posts/

    Once all of these do not display, then Google cannot show them on my snippets. right?

    Warmly,

    Havi

    #350397

    Hi!

    Google can still see them even if they are hidden with CSS so you’ll need to remove them from the source code. You can find them in the following places.

    1. /enfold/includes/loop-index.php on line 137.
    2. /enfold/includes/loop-author.php on line 75.
    3. /enfold/includes/loop-search.php on line 39.
    4. /enfold/config-templatebuilder/avia-shortcodes/masonry-entries.php on line 705.

    The line your looking for will look something like this.

    echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>";
    

    You’ll want to comment that out or delete it from each file.

    Best regards,
    Elliott

    • This reply was modified 10 years ago by Elliott.
    #351545

    Hi Elliott,

    I am a bit afraid of messing up with those lines but in researching Yoast I happened upon this recommendation from Joost from 2 years ago:

    To eliminate the date display on the plugin add this to the theme’s functions.php file:
    add_filter( ‘wpseo_show_date_in_snippet_preview’, ‘__return_false’ );

    And I wanted to run this by you first to make sure I won’t mess anything up and where in the functions.php file should I add it, if you recommend so.

    Thank you sooo much!!!

    Warmly,

    Havi

    #351743

    Hi!

    Yes, it might work. Replace the code with this:

    add_filter( 'wpseo_show_date_in_snippet_preview', false);
    

    Cheers!
    Ismael

    #352205

    Hi Ismael!

    I didn’t add the code yet but Google is not displaying the dates on the snippets (for the most part – very strange, right?) I’ll get to the bottom of it ;) but I am glad I didn’t have to touch any .php file ;)

    Could I please have the css equivalent to : .slide-meta { display: none !important; } that you gave me before but for these pages?

    http://hispanic-marketing.com

    http://hispanic-marketing.com/posts/

    Thank you sooo much!!

    Warmly,

    Havi

    #352777

    Hey Havi!

    Try adding this code to the Quick CSS:

    .av-masonry-date {
        display: none;
    }

    Cheers! 
    Josue

    #352800

    Yesssssss!! Awesome!!! :) Love you guys!! Thank you Josue!! :)

    Warmly,

    Havi

    #352811

    You are welcome Havi, glad we could help :)

    Regards,
    Josue

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