• Resolved zacorehawa

    (@zacorehawa)


    Hello,

    Im trying to show all my blog posts except ones in “for-sale” category (number 7.

    This will work to have everything as I want it expect it shows all blog posts.

    Any ideas? Thanks

    <?php
    /*
    Template Name: Blog
    */
    get_header(); 
    
    		$args = array(
    		'post_type' => 'post',
    		'posts_per_page' => 2,
    		'cat' => '-7',
    		'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 )
    	);
    	query_posts($args);
    	include( get_home_template() );
    	wp_reset_query();
    get_footer();
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘query_posts in theme file’ is closed to new replies.