WordPress.org

Support

Support » How-To and Troubleshooting » How to get related posts by tags?

How to get related posts by tags?

  • Hi,
    This is generating general posts for me and I add them in a box on the sidebar.

    <?php
    
    			$args = array(
    			'post_type' => 'books',
    			'posts_per_page' => 6,
    			'orderby'=>'date',
    			'order'=>DESC,); 	
    
    			query_posts( $args );
    			while ( have_posts() ) {
    			the_post();
    
    			?>

    Do you know what do I need to add in order to get the related posts by tags and not just general ones?

    Many thanks!

  • The topic ‘How to get related posts by tags?’ is closed to new replies.
Skip to toolbar