1

I am creating a taxonomy

    $labels = array(
        'name'               => $name->labels->name, //genre
        'singular_name'      => $name->labels->singular_name, //genre 
        'menu_name'          => $name->labels->menu_name //genre
    );

    $args = array(
        'hierarchical'      => $name->args->hierarchical, //true
        'labels'            => $labels,
        'show_ui'           => $name->args->show_ui,//true
        'show_admin_column' => $name->args->show_admin_column, //true
        'query_var'         => $name->args->query_var, //true
        'rewrite'           => $name->args->rewrite, // books/genre
    );


    register_taxonomy( $name->name, $name->post_types , $args );

This works. Now onto the rewrite.

top level wordpress/books/genre is 404. also wordpress/genre is 404. wordpress/books/genre/term works.

Is there a setting i'm missing to create a archive on the top level? I can do a wp rewrite but would prefer to use inbuilt where possible!

  • what would that archive show? all posts that have any genre? – Milo May 28 '16 at 23:26
  • yes exactly all posts with any term from genre. – David May 28 '16 at 23:40
  • 1
    there's no archive like that in WordPress, tax archives are just single terms. – Milo May 28 '16 at 23:58
  • thats what i was thinking :( wp_rewrite it is..thanks for your input! – David May 29 '16 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.