• Hi,

    I am trying to add meta box’s to 3 custom post types (recipes, ingredients and suppliers). all of them are set to hierarchical. I can register meta box’s on recipes just fine, but when i go down and register meta box’s for ingredients and suppliers, my custom meta box’s do not show up, and the one that was showing up in recipes disappears.

    I had this same problem with register the CPTs originally, and i think i solved it by moving add_action( 'init', 'create_foxware_recipe_post_types' ); from under neath the function to above the function. Also i was trying to register a function for each custom post type, putting all 3 CPTs into a single function got it working.

    But then when i apply the same logic to meta box’s it doesnt work. The codex really helped me with the CPTs but the example on the codex page for meta box’s doesnt really show how it works when register multiple CPTs. I’v held out asking because i didnt want to be lazy but i think im really stumped.

    If it matters i intend to use the meta box’s as a mechanism for custom post type relationships.

    Any help or guidance would be greatly appreciated (i’m a newbie)

    Check out my code on github: https://github.com/greataussiepie/Foxware-Recipe/blob/master/foxware_recipe.php

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Do i have to use init when registering multiple meta boxs for multiple CPTs?’ is closed to new replies.