1
Good night! I created some custom post types through the register_post_type command in wordpress, along with custom Fields (post meta). The problem is that they appear along with the custom Fields in editing the pages (menu pages), as I do to remove them from there?
I would like only custom Fields of each page to appear in page editing and not the fields I created for post type.
Follows the code:
– Rodrigo Trindade
... register_post_type( 'banners' , $args ); } /** BANNER REGISTRATION */ add_action("admin_init", "startBanners"); Function iniciaBanners(){ add_meta_box("Z_ordembanner", "Banner Appearance Order", "Z_ordembanner", "banners", "normal", "low"); }
– Rodrigo Trindade
i put the post type "banners" to appear only on that type of post type... but it is appearing on the custom Fields of all pages...
– Rodrigo Trindade
hm, it might not be that, but I saw that you’re calling
add_meta_box
within the actionadmin_init
. The correct action isadd_meta_boxes
, Strange things happen if you hook up too soon.– Ricardo Moraleida