Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there =)

    One of the best features of “CPT-onomies” is that it can simply be used to create custom post types if that’s all you need. You don’t HAVE to “register your custom post type as a CPT-onomy” to use the plugin.

    With that said, there’s really no need to have code in your theme’s functions.php file to create custom post types as long as you’re using the “CPT-onomies” plugin.

    But if you still want the code for your functions.php file, the WordPress function register post type() will do the trick.

    If you do decide to create custom post types in your theme’s functions.php file, these custom post types can still be registered as CPT-onomies. They will show up in the “Other Custom Post Types” section and you can “edit” them to define the CPT-onomy settings.

    Thread Starter Li-An

    (@li-an)

    OK… Thanks for the answer.

    What if I’m creating a parent theme where the plugin was used to create the post types. I would need to output the post types as code into the functions.php of the parent theme so child themes see the post types. I’m I right?

    Thanks!

    If you’re wanting to define the same custom post types across all sites that use child themes of your parent theme then yes, the easiest method would be to register the custom post types in the functions.php file of your parent theme.

    Nice, I’d like all network to use the same post types. It’s a network of country specific that relates courses to cities in a country. Both courses and cities are CPTs, and the sites will look very similar apart for minor css changes done in the child themes.

    I’m running a multisite install locally for development and registered the post types in the parent theme. I’m using the register_cpt_onomy() in the parent theme as well and the metabox for the city cptonomy show in all sites as you would expect. The current challenge for me is to make the city cptonomies show as a checkist (hierarchical) instead of a tags. I can’t find that argument in the register_cpt_onomy() funciton.

    I may be stretching things but I really appreciate your work on this. beautifull πŸ™‚

    Hey, I can see now (snippet overlooked), my post types definitions had ‘hierarchical’ set to false, and cptonomy, smart enough, follows the post type definitions πŸ˜› all running smooth!

    Yay! I’m glad you got everything working!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: CPT-onomies: Using Custom Post Types as Taxonomies] Export custom posts code’ is closed to new replies.