[wp-trac] [WordPress Trac] #28482: Display hentry only on blog post in the post_class

WordPress Trac noreply at wordpress.org
Sat Jun 7 18:22:14 UTC 2014


#28482: Display hentry only on blog post in the post_class
----------------------------+-----------------------------
 Reporter:  grapplerulrich  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Appearance      |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 According to the [http://microformats.org/wiki/h-entry microformats.org
 wiki]
 > h-entry is often used with content intended to be syndicated, e.g. blog
 posts.

 We are displaying the `hentry` for all CPT's. This would only be needed
 for blogs.

 There are two possible solutions.
 - One solution would be to only display the class when it is a post.

 {{{
 if ( post == get_post_type() ) {
         // hentry for hAtom compliance
         $classes[] = 'hentry';
 }
 }}}

 - The second would be to remove it completely as I don't think WordPress
 should choose what structured data markup formats to use as there are a
 number of different structured data markup formats. Google recommends
 microdata at the moment. (I understand it is not so easy to remove
 something as a number of themes depend on it. I also know that themes can
 easily remove the class.)

 Code in question: https://github.com/WordPress/WordPress/blob/3.9-branch
 /wp-includes/post-template.php#L428

 Similar: https://core.trac.wordpress.org/ticket/26965

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28482>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list