[wp-trac] [WordPress Trac] #10908: Impossible to exclude categries in a category listing

WordPress Trac wp-trac at lists.automattic.com
Sun Nov 7 17:06:00 UTC 2010


#10908: Impossible to exclude categries in a category listing
-----------------------------+----------------------------------------------
 Reporter:  dimitryz         |       Owner:  ryan                                
     Type:  feature request  |      Status:  new                                 
 Priority:  normal           |   Milestone:  Future Release                      
Component:  Query            |     Version:  3.1                                 
 Severity:  normal           |    Keywords:  category, wp_query, category__not_in
-----------------------------+----------------------------------------------
Changes (by upyup):

 * cc: upyup (added)
  * keywords:  has-patch needs-testing => category, wp_query,
               category__not_in
  * version:  2.8.4 => 3.1
  * type:  enhancement => feature request


Comment:

 I have the same problem on v3.0.1

 the goal being to set a user filter on specific categories (chosen in the
 plugin options page)

 If the user chose the category 4 ("Adultes" categorie) and then goes to
 /category/adultes , he is presented the posts from this categories instead
 of the expected "No post found" page

 When changing line 1938

 $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' ";

 into

 $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' ";


 the filter works as a charm

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10908#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list