Update post titles in post lists outside The Loop #47
Description
Selective refresh currently applies title and content changes based on the hEntry microformat, looking for .entry-title
and .entry-content
. This works well for The Loop.
When updating a post/page which appears in a Recent Posts widget or Pages widget, the new title should ideally appear in the widget as well as in The Loop. The Pages widget (via wp_list_pages()
) does add CSS class names for the underlying post ID for each page that is listed, which will make it easy to target the update. The Recent Posts widget does not include these class names, however, so it won't be as easy. If pretty permalinks are turned off (#42) it could find posts by looking at the URLs directly since they will include the post ID (e.g. /?p=123
). This assumes, of course, that the link text is actually the post title itself and not some other text. This is definitely a nice to have, and not something very important.
For other post lists, it may make sense to require microdata/microformats in order for the updates to apply. This is a sensible requirement for themes to have.