I tried the example at https://wordpress.org/support/topic/use-with-custom-post-type-1?replies=6#post-8753864
It doesn’t seem to work for the Woocommerce custom type “Product”
Here is the code I use, please advise:
add_filter(‘USC_allowed_post_types’,’usc_filter_post_types’);
function usc_filter_post_types($types){
//to add a custom post type
$types[] = ‘Product’;
Return $types;
}
Here’s how I got it to work. Put this in your child theme’s functions.php.
add_action(‘USC_add_meta_box’,’GIVE_THE_FUNCTION_A_NAME’);
function GIVE_THE_FUNCTION_A_NAME($obj){
add_meta_box(
‘User_specific_content’,
__( ‘User specific content box’),
array($obj,’User_specific_content_box_inner’),
‘YOUR_CUSTOM_POST_TYPE_NAME’
);
}
-
This reply was modified 9 years, 3 months ago by
Jerrad.