Support » Fixing WordPress » Add category to author loop

  • I am using the following query before the loop to run through author posts and display them with pagination.

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $args = array( 'post_type' => 'post', 'posts_per_page' => 10, 'paged' => $paged, 'author' => $curauth->ID, 'cat' => );
        $wp_query = new WP_Query($args);

    I would also like to include the conditional to only use this query if the category is equal to category 3. How would I add that in the query?

  • The topic ‘Add category to author loop’ is closed to new replies.