Tagged: yoast seo plugin
-
AuthorPosts
-
November 11, 2014 at 1:49 am #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 :)November 11, 2014 at 4:41 pm #349479Hi 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, 1 month ago by Elliott.
November 11, 2014 at 5:36 pm #349548Thank 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) :)November 11, 2014 at 5:37 pm #349549Sorry I just noticed that you commented that out!! :)
November 11, 2014 at 5:38 pm #349551Should I also comment out this one?
echo “<span class=’text-sep text-sep-date’>/</span>”;
November 11, 2014 at 5:56 pm #349571Elliot,
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.comI 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?
November 12, 2014 at 4:22 pm #350050Hi!
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, 1 month ago by Elliott.
November 12, 2014 at 8:03 pm #350290Thank 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
November 12, 2014 at 10:17 pm #350397Hi!
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, 1 month ago by Elliott.
November 14, 2014 at 10:50 pm #351545Hi 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
November 15, 2014 at 9:27 am #351743Hi!
Yes, it might work. Replace the code with this:
add_filter( 'wpseo_show_date_in_snippet_preview', false);
Cheers!
IsmaelNovember 16, 2014 at 11:48 pm #352205Hi 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/posts/
Thank you sooo much!!
Warmly,
Havi
November 18, 2014 at 12:41 am #352777Hey Havi!
Try adding this code to the Quick CSS:
.av-masonry-date { display: none; }
Cheers!
JosueNovember 18, 2014 at 1:18 am #352800Yesssssss!! Awesome!!! :) Love you guys!! Thank you Josue!! :)
Warmly,
Havi
November 18, 2014 at 2:15 am #352811You are welcome Havi, glad we could help :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.