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 can't seem to get my custom taxonomy hierarchy working properly. It seems like many other have had this problem but none of their fixes work for me.

I would like to have a URL structure similar to the default category functionality.

Example

http://domain.com/category/sub-category/subsub-category/postname

But it currently works like this

http://domain.com/custom-post-slug/post-name

I would like to be able to have an archive page for each category and sub category with the specified taxonomy. Is this possible? I've tried everyones proposed solutions, but nothing seems to work. Any advice?

function social_create_venue_post_type() {

    register_taxonomy("venues",
        array("venues"),
        array(
            "hierarchical" => true,
            "label" => "Venue Type",
            "singular_label" => "Type",
            'rewrite' => array('hierarchical' => true, 'slug' => 'type' )
        )
    );

    register_post_type('venues',
        array(
            'labels' => array(
                'name' => 'Venues',
                'singular_name' => 'Venue',
                'add_new' => 'Add Venue',
                'edit_item' => 'Edit Venue',
                'new_item' => 'New Venue',
                'add_new_item' => 'Add New Venue',
                'view_item' => 'View Venue',
                'search_items' => 'Search Venue',
                'not_found' => 'No Venues Found'
            ),
            'public' => true,
            'has_archive' => true,
            'hierarchical' => true,
            'menu_position' => 5,
            'capability_type' => 'post',
            'supports' => array('title','editor','page-attributes','excerpt','thumbnail'),
        )
    );
}
share|improve this question
    
Heres a link to the live code: link –  Alex Miles Jul 16 '12 at 21:02

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.