Question

I've added custom shared taxonomy season for product type from woocommerce and my custom type care. Care type and taxonomy are created in functions.php file of my custom theme.

add_action('init', function() {
    register_post_type('care', array(
        'labels' => array(
            'name' => __('Cares'),
            'singular_name' => __('Care'),
        ),
        'menu_position' => 4,
        'public' => true,
        'show_ui' => true,
        'has_archive' => true,
        'publicly_queryable' => true,
        'supports' => array('title')
    ));

    register_taxonomy( 'season',
        array('product', 'care'),
        array(
            'label' => __('Season'),
            'show_ui' => true,
            'hierarchical' => true,
        )
    );
});

Now when I access season taxonomy term, no matter which post_type been passed, I always get to woocommerce products archive, i.e. http://example.com/?season=helloworld&post_type=product and http://example.com/?season=helloworld&post_type=care lead to the same page with woocommerce products archive.

How to make woocommerce share taxonomy properly?

P.S. Using WordPress 3.8.1 and Woocommerce 2.0.20. No explicit rewrite rules added.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top