Title: mingookoh's Replies | WordPress.org

---

# mingookoh

  [  ](https://wordpress.org/support/users/mingookoh/)

 *   [Profile](https://wordpress.org/support/users/mingookoh/)
 *   [Topics Started](https://wordpress.org/support/users/mingookoh/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mingookoh/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mingookoh/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mingookoh/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mingookoh/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mingookoh/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Excluding categories in a template](https://wordpress.org/support/topic/excluding-categories-in-a-template/)
 *  [mingookoh](https://wordpress.org/support/users/mingookoh/)
 * (@mingookoh)
 * [14 years ago](https://wordpress.org/support/topic/excluding-categories-in-a-template/#post-2451488)
 * Works! Thanks Wimberley, 🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Excluding categories in a template](https://wordpress.org/support/topic/excluding-categories-in-a-template/)
 *  [mingookoh](https://wordpress.org/support/users/mingookoh/)
 * (@mingookoh)
 * [14 years ago](https://wordpress.org/support/topic/excluding-categories-in-a-template/#post-2451486)
 * Wimberley,
    Now, I also use unspoken theme and I’m in same situation. I don’t
   know how to edit this source.
 *     ```
       <?php
       		$paged = ( !empty($paged) ) ? $paged : $page;
       		query_posts(array(
                       'posts_per_page' => get_option('posts_per_page'),
                       'paged' => $paged
       				'cat' => '-5'
                   ));
               ?>
       ```
   
 * This part I understood. but “You need to modify the query_posts() argument string,
   using the appropriate category query arguments.” It’s difficult.
 *     ```
       <?php
   
       	// The Query
       	$the_query = new WP_Query( $args );
       	$query = new WP_Query( 'cat=-5' );
   
       	// The Loop
       	while ( $the_query->have_posts() ) : $the_query->the_post();
       		echo '<li>';
       		the_title();
       		echo '</li>';
       	endwhile;
   
       	// Reset Post Data
       	wp_reset_postdata();
   
       	?>
   
               <?php
       		$paged = ( !empty($paged) ) ? $paged : $page;
       		query_posts(array(
                       'posts_per_page' => get_option('posts_per_page'),
                       'paged' => $paged
       				'cat' => '-5'
                   ));
               ?>
       ```
   
 * This is right? Please, tell me how to use! T_T
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)