Overview

Note

Provided by Aegis Dash. Since Aegis Dash 1.1.0 this block is registered by the plugin. It appears in the inserter once one of its settings is on at Aegis → Blocks → Related Posts; there is no separate switch for the block itself. A site that already used the block through the Aegis theme has those settings turned on the first time Aegis Dash 1.1.0 loads. The theme only registers its own copy while Aegis Dash is not providing the block. Extras marked Pro need Aegis Pro.

PropertyValue
Block nameaegis/related-posts
Registered byAegis Dash 1.1.0 or newer
RenderDynamic (render.php + RelatedPostsQuery.php)
RequiresAegis Dash and the Aegis theme

This is the canonical related-posts path. The former core/query Related Posts variation was removed — see Updating.

Key attributes

AttributeTypeDefaultDescription
postsPerPagenumber3Number of posts
columnsnumber3Grid columns
styleVariantstringgridgrid, list, cards, minimal
taxonomySourcestringautoauto, category, post_tag, or author
orderBystringdatedate, rand, or title
orderstringdescasc or desc (hidden when order is random)
fallbackBehaviorstringlatestlatest or hide when no matches
showFeaturedImage / showDate / showExcerpt / showCategorybooleanvariesMetadata visibility
heading / headingTagstringRelated Posts / h2Section title
excerptLengthnumber20Word count
imageAspectRatiostring16/9Featured image ratio

Usage

Related Posts under a single post.

  1. Insert Related Posts (typically on single post templates).
  2. Set post count and layout variant.
  3. Choose Related by (auto taxonomies, category, tag, or author).
  4. Optionally set Order by (date, title, or random).
  5. Configure fallback when no related posts exist.

The editor canvas shows a live preview of the chosen layout. On a public post it queries related posts for that content; in the pattern library, Site Editor, or other contexts without a public post it previews the latest posts. On the public site the block still renders only on singular views (not archives or the front page).

Content options (heading, post count, columns, excerpt length, image ratio) apply in both the editor preview and on the frontend. Excerpt length appears only when Show Excerpt is on; image aspect ratio appears only when Show Featured Image is on. Columns apply to every style variant. Query options (related by, order by, order, fallback) apply to the editor preview and the public site.

There is no parent Related Posts toggle. Enabling any extra implies the block (same pattern as Query Loop). Without Aegis Dash (the theme’s own copy), all free extras behave as on.

Related Posts options in Aegis → Blocks.

ExtraInspectorOff fallback
related_posts_taxonomy_sourceRelated Byauto
related_posts_orderbyOrder By / Orderdate, descending
related_posts_fallbackFallback Behaviorlatest posts
related_posts_style_variantsStyle Variant (grid, list, cards, minimal)grid
related_posts_excerpt_lengthExcerpt Length20 words
related_posts_image_ratioImage Aspect Ratio16/9

Heading, post count, columns, and display toggles (image, date, excerpt, category) are always available when the block is registered. The Related Posts patterns (aegis/related-posts-cards, -grid, -list, -minimal) register only while the block is on.

Inspector extras are passed as window.aegisRelatedPostsFeatures on the block editor script. The editor canvas uses server-side render, so PHP fallbacks apply in the preview as well as on the public site.

Advanced querying (Pro)

For advanced related-post logic on core/query, use Aegis Pro aegisProRelatedPosts — see Query Loop Pro. That extends Query Loop; it does not replace aegis/related-posts.

Developer notes

Copied!
PHP
add_filter( 'aegis_related_posts_query', function ( $args, $post_id, $context ) { $args['posts_per_page'] = 6; return $args;}, 10, 3 );

Next Steps