WordPress / twentysixteen

Twenty Sixteen is a theme now included in all WordPress installs. To report any issues please go here: https://core.trac.wordpress.org/newticket
324 stars 150 forks source link

Invalid hentry implementation in WordPress pages #465

Open gorgoglionemeister opened 8 years ago

gorgoglionemeister commented 8 years ago

In WordPress pages, the Entry element (hentry) implementation is invalid, missing the required updated and author fields. It causes errors in Google Search Console.

dshanske commented 8 years ago

This issue keeps coming up on various themes. Maybe this is something that needs more education overall.

Volnus commented 8 years ago

I can explain hentry markup.The markup tells Google the author, the date, and other information regarding the post. The issue is in WordPress we don't normally show the date the page was created or last updated this is because we don't need to they are static content. Also, the author information for pages is useless to readers.

What can be done is strip the hentry markup for pages.. Hentry markup looks something like this.

If we normally call the title of a post like this

<h2 ><?php the_title(); ?></h2>

The hentry markup would look something like this. <h2 class="entry-title"> <?php the_title(); ?></h2>

the class is equal to the specific markup we are using.

SOOO the way to fix this is to either display the metadata for the pages or to simply remove it from pages and use a different class to handle the styling.

dshanske commented 8 years ago

I've proposed this in Core. Too many people rely on hentry even though it is improperly applied. It can be adjusted in a specific theme though

grappler commented 8 years ago

This is the core ticket https://core.trac.wordpress.org/ticket/28482 A possible fix for this https://github.com/Automattic/_s/pull/860

karmatosed commented 8 years ago

Do you have a patch we can use for Twenty Sixteen to test @Volnus ?

karmatosed commented 8 years ago

Noting we're still waiting on a patch here.

proweb commented 7 years ago

It lasts many years in all wordpress themes(and in _s too), and I don't understand why it still not solved