Tagged: x
-
AuthorPosts
-
April 12, 2016 at 4:40 pm #878980
peterjitg@yahoo.comParticipantHello,
I’m on Ethos, my domain is updato .com.
Looking at my WMT, I have thousands of these errors under Search Appearance > Structured Data. Looked around but none of the information out there worked for me.
Please assist.
April 12, 2016 at 11:35 pm #879360
Prasant RaiModeratorHello There,
Thanks for writing in!
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
Please try to add this code in your child theme’s functions.php.
// Fix "Missing Author" and "Missing Updated" issue - START // ============================================================================= add_filter( 'the_content', 'custom_author_code'); function custom_author_code($content) { if (is_singular() || is_single()) { return $content . '<div class="hatom-extra hidden"><span class="title">'. get_the_title() .'</span> was last modified: <span class="updated"> '. get_the_modified_time('F jS, Y') .'</span> by <span class="author vcard"><span class="fn">'. get_the_author() .'</span></span></div>' ; } else { return $content; } } // =============================================================================Let us know how it goes.
Thanks.
April 13, 2016 at 10:48 am #880267
peterjitg@yahoo.comParticipantHello,
Where do I find functions.php in X theme so that I can copy it over to child? I don’t see it in framework/views/ethos. Should I just grab the one from /x?
Thanks
April 13, 2016 at 3:36 pm #880798
Prasant RaiModeratorHello Peter,
Thanks for updating the thread!
Please download and install child theme from https://community.theme.co/child-theme/. Once you install the child theme click on Appearance > Editor > function.php.
You can also use FTP to edit files. To do that navigate to wp-content/themes/x-child and open function.php file.
Thanks.
April 15, 2016 at 2:56 pm #884759
peterjitg@yahoo.comParticipantGreat, thanks. Done. I’ll keep an eye out on WMT and keep you posted. Hope this helps.
April 16, 2016 at 5:17 am #885553
ChristopherModeratorYou’re welcome.
April 16, 2016 at 12:26 pm #885937
simplefitParticipanthello! thank you for this forum. after implementing both css and functions.php files, i notice that the results are visible on the page ..
is there a way of implementing this fix without the results being posted at the bottom of every page – it looks horrible to have the results posted on pages. thank you kindly!
April 16, 2016 at 12:30 pm #885941
simplefitParticipantit looks like you may have provided the solution (“hatom-extra hidden”), please let me know if this is the correct solution to my challenge. thank you kindly!
April 17, 2016 at 5:11 am #886620
ThaiModeratorHi @simplefit-2,
Please update the previous code a bit:
// Fix "Missing Author" and "Missing Updated" issue - START // ============================================================================= add_filter( 'the_content', 'custom_author_code'); function custom_author_code($content) { if ( is_singular('post') ) { return $content . '<div class="hatom-extra hidden"><span class="title">'. get_the_title() .'</span> was last modified: <span class="updated"> '. get_the_modified_time('F jS, Y') .'</span> by <span class="author vcard"><span class="fn">'. get_the_author() .'</span></span></div>' ; } else { return $content; } } // =============================================================================Hope it helps 🙂
April 19, 2016 at 12:46 pm #890506
peterjitg@yahoo.comParticipantHi,
So after implementing the code on the 15th, I’ve noticed a slight drop in errors starting from the 16th. But no where near down to zero. The drop is minimal. Also, it shows that an error was “last detected” on the 17th. So I think the errors are still coming in.
April 20, 2016 at 4:38 am #891491
JackKeymasterHi there,
Thanks for writing back! Was it the original code supplied that you added? Can you try with this updated code please?
// Fix "Missing Author" and "Missing Updated" issue - START // ============================================================================= add_filter( 'the_content', 'custom_author_code'); function custom_author_code($content) { if ( is_singular('post') ) { return $content . '<div class="hatom-extra hidden"><span class="title">'. get_the_title() .'</span> was last modified: <span class="updated"> '. get_the_modified_time('F jS, Y') .'</span> by <span class="author vcard"><span class="fn">'. get_the_author() .'</span></span></div>' ; } else { return $content; } } // =============================================================================Thanks!
April 20, 2016 at 11:13 am #892086
peterjitg@yahoo.comParticipantOkay, will try and report back in a couple of days. Thank you.
April 20, 2016 at 10:13 pm #892878
Prasant RaiModeratorLet us know how it goes.
Thanks.
April 22, 2016 at 11:47 am #895609
peterjitg@yahoo.comParticipantOkay, not much has changed. When I first added the code (the first version), it dropped from 3700 errors to about 2900. It has since plateaued, and the new script didn’t seem to have any impact at all.
April 23, 2016 at 10:47 am #896721
RadModeratorHi there,
Is there a way you can provide all the error? I checked it here https://developers.google.com/structured-data/testing-tool/ but looks okay.
It could be related to multiple instances of hentry with no valid data within it. WordPress uses post_class() for outputting classes to elements and by default hentry is part of it. And google always expects rich data for each entry. I’m not sure, though, need to confirm it from the error you’re getting.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-878980 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
