Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have created new taxonomy for posts using this example code from codex.wordpress.org (modified for post instead of book from the example)

$labels = array(
    'name'              => _x( 'Genres', 'taxonomy general name' ),
    'singular_name'     => _x( 'Genre', 'taxonomy singular name' ),
    'search_items'      => __( 'Search Genres' ),
    'all_items'         => __( 'All Genres' ),
    'parent_item'       => __( 'Parent Genre' ),
    'parent_item_colon' => __( 'Parent Genre:' ),
    'edit_item'         => __( 'Edit Genre' ),
    'update_item'       => __( 'Update Genre' ),
    'add_new_item'      => __( 'Add New Genre' ),
    'new_item_name'     => __( 'New Genre Name' ),
    'menu_name'         => __( 'Genre' ),
);

$args = array(
    'hierarchical'      => true,
    'labels'            => $labels,
    'show_ui'           => true,
    'show_admin_column' => true,
    'query_var'         => true,
    'rewrite'           => array( 'slug' => 'genre' ),
);

register_taxonomy( 'genre', array( 'post' ), $args );

After creating some term in this taxonomy and adding the term to the existing post, the posts counter for the term remains at 0 (in wp-admin/edit-tags.php?taxonomy=genre) and have_posts() returns false when I open the archive (example.org/genre/first-term/, $query_string is correctly formed to genre=first-term).

Creating new post with "first-term" checked will correctly increase the counter...

Any idea what could cause the problem?

Thanks

share|improve this question
    
must be caused by something in theme, because turning off the plugins didn't help and clean wp 3.6 installation works correctly... –  tomas Sep 2 '13 at 0:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.