Do you know internal linking is the key to improve your rankings in search results especially in google? Linking manually for each and every post relevant to content is not an easy task, but we can do this using free wordpress plugin known as “Display Posts Shortcode” is a powerful and free wordpress plugin will automatically generate and display related posts based on any supplied parameter such as wordpress tags, categories, category slug, taxonomies and posts ID using different shortcodes and filters with various orders.
“Display Posts Shortcode” will display related posts any where on the post, page or even in sidebar widgets with the help of simple shortcodes. The Display Posts Shortcode is light weight wordpress plugin to allow users to easily display lists of posts without knowing PHP or without editing template files.
Why ‘Display Posts Shortcode’ plugin is better than any other wordpress plugins?
There are many related posts plugin available in the wordpress repository, but those are spoil your server resources and slow down your wordpress installation, but display posts shortcode plugin won’t. Here is the step by step instructions about how to display advanced related posts by using various parameters.
Go to your wordpress admin and navigate to Plugins > Add New menu and install & activate the Display Posts Shortcode plugin.
Activate the plugin
One you have installed and activated the plugin, you won’t to find any plugin related settings or documentation available about how to configure this plugin anywhere on your wordpress admin. You have to remember the shortcodes to generate the related posts or bookmark this page for future reference.
Here is the list of shortcodes with advanced settings about how to generate related posts based on various parameters based on tags, categories, taxonomies, post id’s.
How to display related posts based on post id’s?
Above shortcode will generate and display custom related posts based on our blog posts id 2791,2755,237,2287 and 1752 as you seen just below. Don’t forget to replace the post id’s of your blog.
- Visual Composer Page Builder WordPress Plugin Review
- 25+ Best Clean Style & Minimal Free WordPress Themes / Templates
- Angle Bootstrap Framework App + AngularJS Admin HTML Template
- Stockholm A Genuinely MultiConcept WordPress Theme
- Sahifa Responsive News, Magazine, Blog WordPress Theme
How to display related posts based on category slug?
Above shortcode will display all the posts from specific category slug. In this example we have set the category slug ‘html-templates‘ from our website. So, it populates posts from “HTML Templates” category as shown below.
- Dasha Bootstrap 4 Ready HTML 5 / Angular 4 Admin HTML Template
- SimpliQ Modern Bootstrap 3 & 4 Admin HTML Template / Theme
- Vision Admin Dashboard Premium HTML Template / Theme
- Assist Angular 4+ Ready Admin Dashboard Bootstrap 4 HTML Theme / Template
- Champ Creative Minimal Portfolio HTML Template / Theme
- Quatro Responsive Premium Admin HTML Theme / Template Review
- Atlas Admin Responsive Full AJAX Enabled HTML Theme / Template Review
- Centric Bootstrap 3 Minimal Admin HTML Template With RTL Support
- 15+ Best Bootstrap 3 Premium / Free App Landing Page HTML Templates
- Clearnizr Responsive Frontend + Admin HTML Template / Theme
By default it will populates 10 recent posts with “<li>” wrapper in the supplied category slug. Also you can pass any number of category slugs separated by comma like category-slug 1, category-slug 2, category-slug 3 so on with in the double quotes as appears above.
Here is the another variation with ‘ol’ wrapper
- Dasha Bootstrap 4 Ready HTML 5 / Angular 4 Admin HTML Template
- SimpliQ Modern Bootstrap 3 & 4 Admin HTML Template / Theme
- Vision Admin Dashboard Premium HTML Template / Theme
- Assist Angular 4+ Ready Admin Dashboard Bootstrap 4 HTML Theme / Template
- Champ Creative Minimal Portfolio HTML Template / Theme
- Quatro Responsive Premium Admin HTML Theme / Template Review
- Atlas Admin Responsive Full AJAX Enabled HTML Theme / Template Review
- Centric Bootstrap 3 Minimal Admin HTML Template With RTL Support
- 15+ Best Bootstrap 3 Premium / Free App Landing Page HTML Templates
- Clearnizr Responsive Frontend + Admin HTML Template / Theme
Yet another variation with ‘div’ wrapper
One more variation with ‘offset’ tag
Also you can passover (omit) number of posts by using offset tag. For example if you don’t want to display recent 5 posts from supplied category slug add offset=”5″ inside the shortcode with in the double quotes. It will automatically omits the recent 5 posts and displays the rest of the posts. This trick is applicable for “<li>” and “<ol>” tags as well.
How to generate specific number of posts based on category slug?
The above shortcode display only the 5 recent posts from the supplied category slug as shown below.
- Dasha Bootstrap 4 Ready HTML 5 / Angular 4 Admin HTML Template
- SimpliQ Modern Bootstrap 3 & 4 Admin HTML Template / Theme
- Vision Admin Dashboard Premium HTML Template / Theme
- Assist Angular 4+ Ready Admin Dashboard Bootstrap 4 HTML Theme / Template
- Champ Creative Minimal Portfolio HTML Template / Theme
Note: This plugin also available for wordpress.com blogs by simply dropping shortcode in your page’s content area, but unfortunately you won’t be able to use any of the filters listed in further customization since this requires customizing your theme, which isn’t allowed on WordPress.com blogging platform.
Here is the list of many useful shortcodes and filters to display related posts based on different combinations and use them wisely according to your needs.