@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-related-posts-by-taxonomy/>
  a sioc:Post ;
  dc:title "Using the plugin" ;
  dcterms:identifier 149235 ;
  dc:modified "2026-10-12T23:34:11Z"^^xsd:dateTime ;
  dc:created "2026-10-05T12:56:47Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-related-posts-by-taxonomy/using-the-plugin/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-related-posts-by-taxonomy/">LH Related Posts by Taxonomy</a></li></ul>
<p class="wp-block-paragraph">How related posts appear depends on the kind of template rendering the page.</p>



<h2 class="wp-block-heading">Block themes: the Related Posts block</h2>



<p class="wp-block-paragraph">The plugin provides a <strong>Related Posts</strong> block (<code>lh-related-posts-by-taxonomy/related-posts</code>). WordPress adds it automatically after the post content in single post and page templates, using the Block Hooks API. Archive, index, home, front page, search and 404 templates are left alone.</p>



<ul class="wp-block-list">
<li><strong>For a whole template:</strong> open the template in the Site Editor and move or delete the block. A deleted block stays deleted.</li>



<li><strong>For one post:</strong> insert the Related Posts block anywhere in the content to move it there. The default copy after the content then shows nothing.</li>



<li><strong>Specific posts:</strong> enter comma-separated post IDs in the block&#8217;s Post IDs setting to show those instead of matched posts.</li>
</ul>



<p class="wp-block-paragraph">The block shows a placeholder in the editor; the list itself appears on the site. It needs WordPress 6.5 or later.</p>



<h2 class="wp-block-heading">Classic themes</h2>



<p class="wp-block-paragraph">On classic PHP templates (including the PHP templates of hybrid themes) the list is appended to the post content automatically on single posts and pages, on the last page of a paginated post. It is skipped on the front page, the blog page, feeds, WooCommerce cart, checkout and account pages, and posts whose content contains a form.</p>



<h2 class="wp-block-heading">Hiding related posts on one post</h2>



<p class="wp-block-paragraph">In the post editor, open the post&#8217;s settings sidebar and turn off <strong>Show related posts</strong> in the Related posts panel. Nothing related is shown on that post, whether from the block, the automatic list or the shortcode. The panel appears for post types that support custom fields.</p>



<h2 class="wp-block-heading">Shortcode</h2>



<p class="wp-block-paragraph"><code>[lh_rpbt_display post_ids="12,34,56"]</code> shows the listed posts where the shortcode is placed. A post containing it gets no automatic list. The block is the preferred way to do this in new content; the shortcode is kept so existing content keeps working.</p>



<h2 class="wp-block-heading">What counts as related</h2>



<p class="wp-block-paragraph">Up to three published posts sharing the most terms (categories, tags and any other taxonomy of the current post&#8217;s type) with the current post, newest first when tied. Each is shown with its featured image (falling back to a gallery&#8217;s first image, an image post&#8217;s first image, or the site icon), its title and its excerpt.</p>



<h2 class="wp-block-heading">Upgrading from 1.3 or earlier</h2>



<p class="wp-block-paragraph">The <strong>Automatically add related content</strong> setting under Settings &gt; Reading was removed in 1.4.0, and the stored option is deleted on each site. Use the template, the per-post toggle, or the <code>lh_rpbt_auto_add_related</code> filter (see Developer reference) instead.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Related Posts by Taxonomy
How related posts appear depends on the kind of template rendering the page.



Block themes: the Related Posts block



The plugin provides a Related Posts block (lh-related-posts-by-taxonomy/related-posts). WordPress adds it automatically after the post content in single post and page templates, using the Block Hooks API. Archive, index, home, front page, search and 404 templates are left alone.




For a whole template: open the template in the Site Editor and move or delete the block. A deleted block stays deleted.



For one post: insert the Related Posts block anywhere in the content to move it there. The default copy after the content then shows nothing.



Specific posts: enter comma-separated post IDs in the block&#8217;s Post IDs setting to show those instead of matched posts.




The block shows a placeholder in the editor; the list itself appears on the site. It needs WordPress 6.5 or later.



Classic themes



On classic PHP templates (including the PHP templates of hybrid themes) the list is appended to the post content automatically on single posts and pages, on the last page of a paginated post. It is skipped on the front page, the blog page, feeds, WooCommerce cart, checkout and account pages, and posts whose content contains a form.



Hiding related posts on one post



In the post editor, open the post&#8217;s settings sidebar and turn off Show related posts in the Related posts panel. Nothing related is shown on that post, whether from the block, the automatic list or the shortcode. The panel appears for post types that support custom fields.



Shortcode



[lh_rpbt_display post_ids="12,34,56"] shows the listed posts where the shortcode is placed. A post containing it gets no automatic list. The block is the preferred way to do this in new content; the shortcode is kept so existing content keeps working.



What counts as related



Up to three published posts sharing the most terms (categories, tags and any other taxonomy of the current post&#8217;s type) with the current post, newest first when tied. Each is shown with its featured image (falling back to a gallery&#8217;s first image, an image post&#8217;s first image, or the site icon), its title and its excerpt.



Upgrading from 1.3 or earlier



The Automatically add related content setting under Settings &gt; Reading was removed in 1.4.0, and the stored option is deleted on each site. Use the template, the per-post toggle, or the lh_rpbt_auto_add_related filter (see Developer reference) instead.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
