- 1.5.1: Related posts are now only ever added to the page body. Since 1.3.0 the automatic list and the Related Posts block skipped only content built while the page head was being output; content run through the_content earlier, for example by another plugin before the page template rendered, could still get related posts appended. Both now act only after the body has opened in classic and PHP templates (as before 1.3.0), or while a block template is rendering its markup, which happens after the template is chosen and before the head is output. Lh-tasks #149760.
- 1.5.0: Maintenance release. Deleting the plugin now removes its stored data on every site (its options and the per-post Show related posts setting), through a new uninstall routine. An unused option left by an old version (lh_rpbt-show_related_children) is deleted from each site on upgrade. The editor scripts for the Related Posts block and the Show related posts toggle can now be translated. The shortcode no longer uses extract() and validates its post_ids; its unused format attribute is gone. Unused internal code has been removed (a debug logger and its lh_rpbt_return_plugin_debugging_status filter, and two unused helper methods). The plugin can now be switched off in code with the lh_rpbt_init_plugin filter, and gains a plugin_name() method. Header: the name is now LH Related Posts by Taxonomy, and Requires PHP 7.4 is declared. The on-disk readme.txt has been removed: readmes are now compiled from the plugin's documentation at lhero.org, after a check that everything in it is covered there; its FAQ is now the Support page, and the changelog history for 1.00 and 1.01 has been carried over. Lh-tasks #149204.
- 1.4.1: Bug fixes. Related posts without a featured image (and no gallery, first-image or site icon fallback) are now listed with their title and excerpt; previously they were silently left out and their list item was never closed, breaking the list's HTML. Related post titles and links in the default template are now escaped, the redundant 'Permanent Link to' title attributes are removed, and the image link is hidden from screen readers and keyboard focus since the title link right after it goes to the same place. The related-posts database query is now built with prepared statements, so term IDs and IDs supplied through the lh_rpbt_get_excluded_ids_filter and lh_rpbt_get_included_ids_filter filters can no longer alter the SQL. The post types it searches are no longer hard-coded: they come from the new lh_rpbt_get_related_post_types filter, which defaults to posts only, so results are unchanged. Post IDs given to the shortcode or block are validated before use. Themes overriding lh_rpbt-templates/default-template.php are unaffected. Lh-tasks #149204.
- 1.4.0: New Related Posts block. In block themes, related posts are now a block (lh-related-posts-by-taxonomy/related-posts) that WordPress adds after the post content in single post and page templates automatically, using the Block Hooks API; archive, index, home, front-page, search and 404 templates are excluded. Site owners can move or remove it per template in the Site Editor. Authors can move it within a post's content by inserting the block there (the default instance after the content then outputs nothing), and can show specific posts with the block's optional Post IDs setting, like the shortcode's post_ids. New 'Show related posts' toggle in the post editor's document sidebar: turning it off hides related posts on that post or page wherever they would appear (block, automatic list or shortcode). Classic themes, and PHP templates in hybrid themes, keep the automatic list after the post content; it is now skipped whenever a block template is rendering, so posts never show related posts twice. The 'Automatically add related content' setting under Settings > Reading has been removed: placement is decided by the template, the per-post toggle, or in code with the new lh_rpbt_auto_add_related filter (return false to turn the automatic list off). An upgrade routine deletes the old option on each site, which also restores related posts on sites where a bug before 1.3.0 had saved it as off. The shortcode is unchanged. Requires WordPress 6.5. Added License and Requires at least headers. Lh-tasks #149204.
- 1.3.0: Related posts now appear in block templates. Block templates render post content before wp_head and wp_body_open, so the the_content filter that was added on wp_body_open never ran there (Related was missing on pages using a block template). The filter is now registered on template_redirect, with the same checks plus an is_feed() early return, and the related-posts filter returns early during wp_head, so related markup still never appears in the head (for example in excerpts built for meta description or Open Graph tags). Settings fix: the Reading setting 'Automatically add related content' was sanitised with is_bool, which turned the posted value into false, so saving Settings > Reading switched auto-add off. It now uses rest_sanitize_boolean, and the Yes/No dropdown shows the saved value correctly. Also fixed: non-viewable post types are now actually excluded (a variable-name typo meant they never were); an output buffer was left open when a post had no related posts; the settings dropdown is escaped; the settings label typo is corrected. Removed: a leftover demo block (related-posts-block, 'Hello, WordPress 7.0!'), dead code, a stale duplicate Version header line and the closing PHP tag. Added plugin_version(), which reads the version from the plugin header. Lh-tasks #149191.
- 1.2.0: lh-tasks #151390: move Princes Park Touch's related-posts CSS into the plugin. Default template's wrapper gains the shared no-print class (left out of printouts by themes that honour it, e.g. LH 2015). Plugin stylesheet gains the rule hiding the third related post below 910px, previously in PPT's Additional CSS. Version 1.2.0: the header also carries a stale second 'Version: 1.01' line, so a patch bump of 1.00 (1.0.1) would compare lower than it.
- 1.01: Translation support.
- 1.00: Initial release.