Custom Post Types/Taxonomies as a plugin


I know there are plugins that help you create custom post types and taxonomies, but I wanted to create a plugin where I can define the custom post types and taxonomies instead of putting it all in the theme’s functions file since themes can change over time.

I can get the custom post type to appear, but I’m having an issue with the taxonomies appearing.

I tried to keep my code organized so I have the plugin file including other files. For example:

// The full path to the plugin directory
define( 'BUSINESS_DIR', WP_PLUGIN_DIR . '/' . basename( dirname( __FILE__ ) ) . '/' );
define( 'BUSINESS_URL', WP_PLUGIN_URL . '/' . basename( dirname( __FILE__ ) ) . '/' );

// Load plugin files

// Initialize
add_action( 'init', 'register_business' );
add_action( 'init', 'register_business_type' );

// Activate plugin
register_activation_hook( __FILE__, 'activate_businesses' );
function activate_businesses() {
// Activate custom post type
// Activate taxonomies
// Flush rewrite rules to fix permalinks

Within the taxonomies.php file, I have the register_business and register_business_type functions.

Why is the post type displaying but not the taxonomy?