Have you seen related posts in wordpress? Clearly relatively every blogger utilize this to make their blog more client friendly.Although there are several modules to show related posts in single Post.

Related posts in WordPress is the extremely valuable to connect with the group of onlookers of your site. WordPress gives you the ability to demonstrate the related posts of a particular post write. Show the related post of the article is simple and you can add related presents list on your blog without utilizing any module.

On the off chance that you need to demonstrate related posts for custom post compose, the presents require on be brought by custom scientific categorization terms of custom post write. In this instructional exercise, we will indicate how you can without much of a stretch show the related posts for custom post write in WordPress. You don’t have to utilize any WordPress module for demonstrating the related post of custom post compose.

For the most part, particular post points of interest page (single.php) is utilized for custom post compose. Open the single-custom_post_type.php document and place the accompanying code where you need to show the related posts rundown of custom post compose. This code will get posts of a similar custom post compose and same custom scientific classification terms of the present single post.

<?php
//get the taxonomy terms of custom post type
$customTaxonomyTerms = wp_get_object_terms( $post->ID, 'your_taxonomy', array('fields' => 'ids') );
//query arguments
$args = array(
'post_type' => 'your_custom_post_type',
'post_status' => 'publish',
'posts_per_page' => 5,
'orderby' => 'rand',
'tax_query' => array(
array(
'taxonomy' => 'your_custom_taxonomy',
'field' => 'id',
'terms' => $customTaxonomyTerms
)
),
'post__not_in' => array ($post->ID),
);
//the query
$relatedPosts = new WP_Query( $args );
//loop through query
if($relatedPosts->have_posts()){
echo '<ul>';
while($relatedPosts->have_posts()){ 
$relatedPosts->the_post();
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
}
echo '</ul>';
}else{
//no posts found
}
//restore original post data
wp_reset_postdata();
http://codingbin.com/wp-content/uploads/2018/03/Custom-Related-Posts-WordPress-Plugin.pnghttp://codingbin.com/wp-content/uploads/2018/03/Custom-Related-Posts-WordPress-Plugin-150x150.pngManoj DhimancmsphpWordPresscustome post type,wordpressHave you seen related posts in wordpress? Clearly relatively every blogger utilize this to make their blog more client friendly.Although there are several modules to show related posts in single Post. Related posts in WordPress is the extremely valuable to connect with the group of onlookers of your site....coding, php, wordpress, yii, cakephp, and  jquery

Are you want to get implementation help, or modify or extend the functionality of this script? Submit paid service request