@alxmedia Anything about this problem ?
-
This reply was modified 7 years, 5 months ago by
togebi33.
Hi, I’ve looked into this and if you see the first comment by Peter Tilva:
https://moz.com/ugc/how-to-fix-structured-data-markup-errors-on-existing-pages#comment-376447
You just need to add these 3 things to single.php.
For missing “entry-title” I have added in single.php file <h1 class=”entry-title”><?php the_title(); ?></h1>
For missing “Updated” I have added in single.php file <span class=”date updated”><?php the_time(); ?></span>
For missing “Author” I have added in single.php file <span class=”vcard author post-author”><span class=”fn”><?php the_author(); ?></span></span>
Try this single.php example: https://www.dropbox.com/s/v9guvh0gfbwmkyq/single.php?dl=1 – remember to add it with a child theme so that it doesn’t disappear next time you update your theme.
Thanks but problem is it gives error on category , tag and index pages. Its fine on content pages. Can you check it please.
Last Updated : <?php the_time(); ?>
Google would punish me if i use this.
<?php get_post_modified_time( $d, $gmt, $post, $translate ); ?>
This function would be better to use.
-
This reply was modified 7 years, 5 months ago by
togebi33.
Any help for category and tag pages ?
What errors are you given on the category and tag pages?
I already posted what errors i got on that pages on first post. Google considering tag and category pages as article page.
Ah sorry, I didn’t read what you said properly with it not being a problem with single.php.
What you would need to edit instead then would be content.php / content-featured.php / content-picks.php and content-highlight.php with the missing classes.
Yeah but if i add those fields to that pages there will be a lots of stuff on page. It will be so complicated.
Is there any way to block google check these stuffs on category and tag pages ?
No way to block as far as I know – but you could just ignore the warnings. You are one of few to care about it when it comes to my themes.
I don’t think it is super important for SEO overall.
What if i add them to tag and category pages and hide them with css {display: block;}
Can google punish me for that ?
I think Google easily sees that you hide it, yes. { display: none; }
Not sure if it would get rid of your warnings/errors either, but I guess you can give it a try.
I’m no SEO guru, but I don’t think you should worry too much about the warnings.