Issues with Structured Data and single.php

eCommerce WordPress theme with various e-store features and WooCommerce support.
GK User
Tue Dec 10, 2013 5:16 pm
I ran my site page; http://drshawnadarou.com/fertilty-care/ through Google's Structured Data Testing Tool here http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fdrshawnadarou.com%2Ffertilty-care%2F# and I get the following errors:

Error: Missing required field "entry-title".
Error: Missing required field "updated".
Error: Missing required hCard "author".

Apparently i can fix this by editing single.php according to this: http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings but when I open single.php all I get are GK reference calls. could someone point me to the right file to make the edits to correct these errors?? Thanks
User avatar
Gold Boarder

GK User
Wed Dec 11, 2013 8:57 am
Hi,

Missing required field "entry-title". - you can edit H1 tag in layouts/content.post.header.php file
Error: Missing required field "updated". - date you can edit in gavern/helpers/helpers.layout.fragments.php file (around line 246)
Missing required hCard "author".- gavern/helpers/helpers.layout.fragments.php - gk_author function.
User avatar
Moderator

GK User
Wed Dec 11, 2013 2:55 pm
Hi, I looked inside layouts/content.post.header.php file and couldn't find any H1 tags.
User avatar
Gold Boarder

GK User
Wed Dec 11, 2013 3:03 pm
also couldn't find

<span class="post_date"><?php the_time('j F,Y'); ?>

in the helpers.layout.fragments.php file either. are you using a different naming system??
User avatar
Gold Boarder

GK User
Wed Dec 11, 2013 3:12 pm
as for
Missing required hCard "author".- gavern/helpers/helpers.layout.fragments.php - gk_author function.
. I looked but have no clue how to edit the code according to the recommendations on http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings It seems your code is custom and I can't figure out how to edit it to eliminate those errors. any help??
User avatar
Gold Boarder

GK User
Thu Dec 12, 2013 8:42 am
Our functions are a little extended :)

It's from layouts/content.post.header.php file
Code: Select all
<h<?php echo (is_singular()) ? '1' : '2'; ?>>
H1 or H2 tag, so you can change it to
Code: Select all
<h<?php echo (is_singular()) ? '1' : '2'; ?> class="your_class">



from helpers.layout.fragments:
Code: Select all
<time class="entry-date" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                <?php echo esc_html(get_the_date('F j, Y')); ?>
             </time>

There's time tag instead of span, you can try add your class to time tag or change it to span.

In regards to the autor, you can edit layouts/content.post.footer.php file and edit this fragment:
Code: Select all
<?php if($social_api_output != '' || gk_author(false, true)): ?>
   <footer>
      <?php echo $social_api_output; ?>
      <?php gk_author(false, false); ?>
   </footer>
   <?php endif; ?>


remove our <?php gk_author(false, false); ?> function and try to put this one from your solution:

Code: Select all
<span class="vcard author">
<span class="fn"><?php the_author(); ?></span>
</span>
User avatar
Moderator


cron