• I’ve created a custom post type ‘Events‘ as well as a custom taxonomy tied to that ‘Event Categories‘. My problem is that within the custom taxonomy page, ‘Event Categories‘, it’s also displaying regular post categories that have at least one or more posts assigned to them. This seems like it is a bug to me as it’s not always displaying the post categories, but only when they have 1+ posts associated with them. They are also showing up within the ‘Events‘ pages under the custom ‘Event Categories‘ taxonomy box.

    The ideal situation is to not have any post categories showing within the custom taxonomy page and I would think that would be a default setting.

    I’ve tried searching WordPress and Google for anything in regards to this issue but haven’t come across anything. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jchiappisi

    (@jchiappisi)

    This is the code used to initiate the custom post type ‘Events‘:

    add_action('init', 'createEvents');
    
    function createEvents(){
    
    // Fire this during init
    register_post_type('events', array(
    	'label' => __('Events'),
    	'singular_label' => __('Event'),
    	'add_new_item' => __('Add New Event'),
    	'edit_item' => __('Edit Event'),
    	'new_item' => __('New Event'),
    	'view_item' => __('View Event'),
    	'public' => true,
    	'show_ui' => true,
    	'capability_type' => 'post',
    	'hierarchical' => false,
    	'show_in_menu' => true,
    	'menu_position' => 20,
    	'rewrite' => false,
    	'show_in_nav_menus' => false,
    	'supports' => array('title', 'editor', 'author', 'excerpt','eventcategories')
    ));
    }

    This is the code used to initiate the custom taxonomy ‘Event Categories‘:

    add_action('init','create_event_taxonomies');
    
    function create_event_taxonomies(){
    	register_taxonomy('eventcategories','events',
    		array(
    			'hierarchical' => true,
    			'label' => 'Event Categories',
    			'singular_label' => 'Event Category',
    			'show_ui' => true,
        		'query_var' => 'events',
        		'rewrite' => array( 'slug' => 'event-type' ),
    	));
    }
    Thread Starter jchiappisi

    (@jchiappisi)

    I’ve tried looking up this issue in various places with no luck. I’ve also better studied the variables a little more so to see if it could be an issue with them, but nada. Any help would be appreciated!

    Are you experiencing the same thing? Anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post Categories displaying in Custom Taxonomies’ is closed to new replies.