New answers tagged

0

Please read this Codex page why you should not use query_posts(). If you really want to use query_posts(): query_posts( 'name' => 'test', 'category' => '-15' // notice "minus 15" ); The right way to exclude category: $query = new WP_Query( array( 'name' => 'test', 'category__not_in' => array(15) ) ); if ( ...


0

wp_query has the offset parameter which you can use to skip posts, e.g. $args = array( 'post_type' => 'video', 'tax_query' => array( array( 'taxonomy' => 'tax-video', 'field' => 'slug', 'terms' => 't-o-t-w', ), ), 'posts_per_page' => '8', 'offset' => 1, // excludes the first post in the query ); you may just be ...



Top 50 recent answers are included