WordPress Hook to Change Default Publishing Discourse Category per Post Type

There is a wp_discourse_publish_categories filter hook that I think will work for this. Some details about it are here: WP Discourse plugin tips and tricks. In the example code, I set it so that two categories were available for a custom post type. I think for your case all you will need to do is just make a single category available per custom post type. You will need to test this out.

As long as the “Display Subcategories” option is enabled, you will be able to use subcategories. That option is found on the WP Discourse plugin’s Publishing Settings tab.

2 Likes