WordPress.org

Ready to get started?Download WordPress

Forums

Excluding categories from $wp_query using Starks framework (1 post)

  1. BenMoseley
    Member
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic