About WP Related Posts Pro
WP Related Posts Pro for WordPress allows site owners to display related posts on your site in a variety of unique layouts using the global setting, widgets, or shortcodes.
WP Related Posts Pro’s plugin settings can be found in Settings > Related Posts Pro.
Title [text] – Set a title to display above your related posts.
Default Thumbnail [image] – Select an image to use as the default in case a post has no Featured Image.
Layout [select: Inline Card, Stacked Card, Thumbnail, Grid, Slider, Image Tile, Plain List, Fancy Colors, Colored Tabs, Image Flip] -Select the layout you wish to display the related posts in. This selection will change plugin options.
Number of Posts [select: 1 – 20] – Select the number of posts to showcase.
Theme Style Override [checkbox] – Select this if you wish to style the text on your own or with your theme; otherwise the plugin will style the text.
Display Asynchronously [checkbox] – Select this if you wish to load related posts after the page has loaded. May delay the layout display, but prevents the plugin from affecting page load time.
Where to Display
Location [select: Bottom of Post, Top of Post, Manually Setup] – Select where you prefer the related posts to show. By selecting Manually Setup, you elect to place widgets and shortcodes throughout your site instead of automatically displaying related posts (see Widgets, Shortcodes, and PHP sections below). This selection will change plugin options.
Display on post types [select: Any Post Type, Post, Page, custom post types] – Select which post types to display related posts on.
Do not display in [select] – Select any number of posts to exclude from each post type.
The Related Posts Pool is a simple calculator for defining the total number of available posts that can be shown. By selecting the options below, you will dynamically change the possible number of related posts.
Related By [select: Contextual, Category, Post_tag, custom taxonomies] – Select the relational mechanism for how the plugin relates posts. Contextual will relate posts with similar titles, while the other options will retrieve posts based on that particular taxonomy.
Exclude Posts in These Post Types [select: page, post, custom post types] – Select the post types you would like to include as part of the Related Posts Pool. Posts in Post Types that are not included here will not be shown. This selection has the greatest impact on the Related Posts Pool.
Exclude [select] – Select individual posts or taxonomies that you would like to exclude from the Related Posts Pool.
Time Range [select: 1 Day, 7 Days, 30 Days, 1 Year, All Time] – Select the range of publish dates the plugin can use to draw related posts.
Add Recent Posts [checkbox] – If the number of related posts are less then the number of posts set to display, then use recent posts for the remaining ones. This is helpful in filling any gaps if there is not enough content to relate to.
Order [select: ascending, descending] – Select the order of posts. Ex. Ascending: A – Z, 1 – 10, Today – Yesterday. Descending: Z – A, 10 – 1, Yesterday – Today.
Order By [select: None, ID, Author, Title, Name, Type, Date, Last Modified Date, Parent ID, Random, Comment Count, Menu ID] – Select how you would like the related posts to be sorted. Use Menu ID to set a custom order Pages using the Order text field in the Page edit screen. The Order option above will change the sort direction.
WP Related Posts Pro can also be used as a Widget and has exactly the same options fields as the above settings except for ID.
ID – Use this ID to easily target an individual widget for custom CSS rules. Save the widget at least once to generate the correct ID.
WP Related Posts Pro has a built-in shortcode builder to place related posts within your posts and pages. Navigate to the Edit screen of any post or page and click Related Post Pro (next to Add Media) to open up the shortcode builder.
It has the same options as a widget, but will add the shortcode directly to your post upon saving. The shortcode from the builder will look something like this:
[nnr_related_posts id="nnrobots_related_posts_1" layout="thumbnail" related_by="category"]
PHP Template Tags
There are no explicit template tags so you must use the WordPress do_shortcode() function. We advise that you use the shortcode builder to first create the shortcode, then copy and paste the shortcode into the do_shortcode() function. The id field is used to differentiate multiple instances of related posts on one page.
<?php do_shortcode('[nnr_related_posts id="nnrobots_related_posts_0"]'); ?>