Since version 4.4.0, you can show related posts of any post easily, by pasting View shortcode with additional parameter to where you want to display related posts.
Show related posts in same category
[pt_view id="VIEW_ID" cat="GET_CURRENT"]
Please replace VIEW_ID with ID of your View, and do not change the GET_CURRENT. Then the above code will show posts which have same category as the viewing post.
Show related posts in same tag
[pt_view id="VIEW_ID" tag="GET_CURRENT"]
Show related posts in same custom taxonomy “Testimonial”
[pt_view id="VIEW_ID" taxonomy="testimonial" terms="GET_CURRENT"]
You can replace “testimonial” by any custom taxonomy in your WordPress site.
Automatic detect taxonomy of current post, then get related posts
[pt_view id="VIEW_ID" taxonomy="GET_CURRENT" terms="GET_CURRENT"]
In above shortcodes:
– VIEW_ID is ID of the View which configures the desired layout
– GET_CURRENT is the constant which instructs CVPro to get current category, tag, taxonomy or terms of the current post
And certainly, you can set limit number of related posts easily by using the limit parameter, for example:
[pt_view id="VIEW_ID" cat="GET_CURRENT" limit=4]
Notice: showing related posts by View doesn’t support Ajax pagination. It supports Non-Ajax pagination only.