webdesignerart
says
Hi guys i am bit stuck to add same meta box in multiple custom post type but its not work.
function avz_custom_meta_box() {
// $post_types = get_post_types( array( 'public' => true ) );
$post_types = get_post_types();
foreach ( $post_types as $post_type ) {
if ( $post_type == 'page' || $post_type =='post' )
continue;
add_meta_box( $prefix.'image', 'Header Image Upload Box', 'show_avz_custom_meta_box', $post_types, 'normal', 'high' );
}
// add_meta_box( $prefix.'image', 'Header Image Upload Box', 'show_avz_custom_meta_box', 'avanza_cp_page', 'normal', 'high' );
}
add_action('add_meta_boxes', 'avz_custom_meta_box');
But when give custom post id in String its works 
webdesignerart
says
Any one? 
2981 posts
- Community Superstar
- Item was Featured
- Author was Featured
- Has been a member for 5-6 years
- Won a Competition
- Sold between 50 000 and 100 000 dollars
- Bought between 10 and 49 items
- Referred between 50 and 99 users
- Europe
wickedpixel
says
In add_meta_box line… isn’t there $post_type instead of $post_typeS?
mazoor
says
webdesignerart said
Any one?![]()
Talking about complaining after 7 minutes – you know this is not a Support Live Chat, right?
webdesignerart
says
OMG , This little S ….. I am big Dumb, Thanks for your help Dude 
