WordPress hentry problem

From IndieWeb


WordPress hentry problem is an improper use of classic microformats that cannot easily be changed due to backward compatibility issues.

hentry is designed for episodic or datestamped content on the web. WordPress indiscriminately puts it on everything. And because it is on all entries, it has become popular as a styling element, which means on many themes, removing this or changing its application results in a change in the visual appearance of the entire site.

Ulrich Pogson proposed changing application of hentry with a WordPress ticket(https://core.trac.wordpress.org/ticket/28482).

David Shanske attempted an alternate solution going forward by opening another ticket(https://core.trac.wordpress.org/ticket/32336). The comments included, "hentry shouldn't have been used for styles, but it has been for years, and therefore it won't be going anywhere." This led to a third ticket(https://core.trac.wordpress.org/ticket/32348) which requested hentry be removed from bundled themes as a styling element. This was agreed going forward, but not on existing themes.

The Twenty-Sixteen theme released concurrently with WordPress 4.4 on 2015-12-07 does this. It is also correctly uses hfeed only on single pages as opposed to all pages, and action for which the original source is still unknown.

hentry is also close to be adjusted in the Automattic sponsored starter theme, _s(pronounced Underscores) which is the basis for many new themes. See Pull Request(https://github.com/Automattic/_s/pull/860). The related hfeed issue is already merged into the theme.

The current open ticket for including Microformats 2 into WordPress core in all places where WordPress automatically adds markup. However, there was a request for it to be added with the classic microformats retained. For some areas, this is not an issue. But if h-entry is applied identically to hentry, it would propogate the same issue as before.


IndieWeb Examples

Ryan Barrett avoids this kind of problem on his WordPress site by using the wordpress-uf2 plugin and putting this in his theme's header.php file:

<?php
/* Remove the microformats1 hfeed class from the post element
 * because it interferes with php-mf2's microformats2 parsing.
 * http://microformats.org/wiki/microformats2-parsing-issues#mixture_of_microformats2_and_classic_microformats_classnames_on_different_elements
 */
ob_start();
include TEMPLATEPATH . '/header.php';
$header = ob_get_contents();
ob_end_clean();
$header = str_replace('class="hfeed site"', 'class="site"', $header);
if (!is_singular()) {
  $header = str_replace('<hgroup>', '<hgroup class="p-name">', $header);
}
echo $header;
?>


WordPress
Topics Getting Started on WordPress β€’ Advanced WordPress Set Up β€’ Plugins β€’ Themes β€’ Examples β€’ WordPress with Bridgy β€’ Development β€’ Data β€’ Security
Primary Plugins Indieweb Plugin β€’ Webmention β€’ Semantic Linkbacks β€’ Micropub β€’ IndieAuth β€’ Post Kinds β€’ Syndication Links β€’ WebSub plugins
POSSE Plugins Syndication Links β€’ Social Network Auto Poster β€’ JetPack Publicize β€’ WP Crosspost β€’ Tumblr Crosspostr β€’ Diasposter β€’ Mastodon Autopost β€’ Bridgy Publish plugin (deprecated) β€’ Medium (deprecated)
PESOS Plugins Keyring Social Importers β€’ DsgnWrks Twitter Importer β€’ DsgnWrks Instagram Importer
Other Plugins IndieBlocks β€’ Shortnotes β€’ ActivityPub Plugin β€’ Aperture β€’ Refback plugin β€’ IndieWeb Press This β€’ WordPress MF2 Feeds Plugin β€’ WordPress uf2 β€’ OpenID β€’ Simple Location β€’ Parse This β€’ Indieweb Actions β€’ PressForward β€’ Yarns Indie Reader β€’ WhisperFollow β€’ blogroll2email
Themes SemPress β€’ (SemPress Child Themes: SemPress Lite, SenPress, and Index) β€’ Autonomie β€’ Independent Publisher β€’ IndieWeb Publisher β€’ mf2_s β€’ Twenty Sixteen IndieWeb-friendly fork β€’ IndieWeb Twenty Fifteen Theme β€’ Doublescores
Assistance Join the #indieweb chat β€’ IRC and other chat options β€’ WordPress FAQ β€’ WordPress Outreach Club β€’ Troubleshooting Tips β€’ WordPress tools β€’ WordPress channel
See also WordPress related wiki pages β€’ Category:WordPress plugins β€’ Category:WordPress themes β€’ Category:WordPress sessions β€’ WordPress.com β€’ WordPress using IndieMark β€’ AWS Tutorial