WordPress.org

Ready to get started?Download WordPress

Forums

How to get related posts by tags? (1 post)

  1. tomystein
    Member
    Posted 2 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags