You have to register your post type before you flush the rules. Your init
action doesn’t run on plugin activation, so your flush_rewrite
method should call register_content_types
first before flushing the rules.
You have to register your post type before you flush the rules. Your init
action doesn’t run on plugin activation, so your flush_rewrite
method should call register_content_types
first before flushing the rules.