• Title says it all.

    Here’s the query used:

    <?php if ( $wp_query->max_num_pages > 1 ) : ?>
    		<?php next_posts_link( __( '&larr; Older posts', 'twentyten' ) ); ?>
    		<?php previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) ); ?>
    <?php endif; ?>

    I’ve tried this:

    <?php
    $args=array(
    	'category__not_in' => array('9', '10', '12', '13')
    );
    $the_query = new WP_Query($args);
    ?>
    <?php if ( $the_query->max_num_pages > 1 ) : ?>
    		<?php next_posts_link( __( '&larr; Older posts', 'twentyten' ) ); ?>
    		<?php previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) ); ?>
    <?php endif; ?>

    No dice. Anyone dealt with this before?

  • The topic ‘Excluding categories from $wp_query using Starks framework’ is closed to new replies.