• Resolved superlou

    (@superlou)


    I’ve created a custom post type ‘video’ and registered a taxonomy as so:

    add_action('init', 'lmctv_video_taxonomy_init');
    function lmctv_video_taxonomy_init() {
    	register_taxonomy(
    		'category',
    		'video',
    		array(
    			'label' 	=> __('Video Categories'),
    			'rewrite'	=> array('slug' => 'video-category')
    		)
    	);
    }

    Unfortunately, even when a post has an category attached (e.g. https://lmctv5.louissimons.com/videos/smart-beautiful-you-episode-11/), the category listing is empty (https://lmctv5.louissimons.com/video-category/episodic/). I’ve been looking at the database, and it looks like the wrd_term_relationships table is properly linking the category and video together. The wrd_term_taxonomy table even lists the proper number under the “count” column.

    I was wondering if anyone knows what I could do to further debug the situation?

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

    (@superlou)

    I just found that if I visit the uncategorized category (https://lmctv5.louissimons.com/video-category/uncategorized/), I get a list of other posts (not the video custom post type).

    Edit: I think this might be the wrong forum for this post. Could a moderator move this to the hack forum (or the correct place)? Thank you.

    Thread Starter superlou

    (@superlou)

    And…resolution. If I changed the taxonomy name to ‘lmctv_video_category’, everything starts working. I think I may have had a name collision, though not sure the official cause.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Categories for custom post type empty’ is closed to new replies.