Displaying related posts
Display in a widget
The easiest way to display any related posts you have set is by using a widget. You can add the Custom Related Posts widget on the Appearance > Widgets page.
Here we've added a widget to the footer, for example:
Use the options to change the text that gets displayed and the order of related posts.
Display using the block
In the Block Editor you can click on the + icon to add the Custom Related Posts block to your post:
When selecting the block you'll find the display options in the sidebar.
The block will show a live preview of the related posts.
Display using the shortcode
The [custom-related-posts] shortcode can be typed anywhere you want your related posts to display. The same options as in the widget and block are available like this:
[custom-related-posts title="Related Posts" none_text="None found" order_by="title" order="ASC"]
Display in your theme code
Want the related posts to show up in a specific location in your theme? The shortcode can be displayed anywhere in your theme files using PHP like this example:
<?php echo do_shortcode( '[custom-related-posts]' ); ?>