Quick Answer: How do I change related posts in WordPress?

Go to the My Sites → Switch Sites and select your site (if you have more than one). Click My Sites → Tools → Marketing. On the Traffic tab that appears, scroll down to the “Related Posts” settings. Select either “Show related content after posts” or “Hide Related” content after posts” to turn the feature on or off.

Add this code inside your single. php after a loop wherever you want to show related post, <? php $related = get_posts( array( ‘category__in’ => wp_get_post_categories($post->ID), ‘numberposts’ => 5, ‘post__not_in’ => array($post->ID) ) ); if( $related ) foreach( $related as $post ) { setup_postdata($post); ?>

Installation

  1. Extract zip in the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Customize plugin settings at menu Related Posts. Find it at the left bottom of the side menu in wp-admin.

To activate the Related Posts module, select Jetpack > Settings from your WordPress menu. Then select the Traffic tab and scroll down to Related Posts. Activate the button next to Show related content after posts to turn the related posts feature on.

Related Posts by Taxonomy

IT IS INTERESTING:  How do you call a dynamic menu in WordPress?

Categories and Tags are two default WordPress taxonomies used by most WordPress blogs. Related Posts by Taxonomies plugin allows you to display posts using the same taxonomy terms. For example, you can select to display posts by ‘Category’ or ‘Tags’.

‘tag__in’ => $tag_ids , ‘post__not_in’ => array ( $post ->ID), ‘posts_per_page’ =>4, // Number of related posts to display. $my_query ->the_post();

How do I show category wise posts in WordPress?

Now, if you want to display all your posts from a specific category on a separate page, WordPress already takes care of this for you. To find the category page, you simply need to go to Posts » Categories » View page and click on the ‘View’ link below a category.

Make a website