Hi
write functions.php and delete comment “//” and rewrite “your_post_type(Default:post)”
remove_post_type_support('your_post_type','title');
function my_remove_post_support() {
// remove_post_type_support('post','title'); // title
// remove_post_type_support('post','editor'); // main editor
// remove_post_type_support('post','author'); //
// remove_post_type_support('post','thumbnail'); //
// remove_post_type_support('post','excerpt'); //
// remove_post_type_support('post','trackbacks'); //
// remove_post_type_support('post','custom-fields'); //
// remove_post_type_support('post','comments'); //
// remove_post_type_support('post','revisions'); //
// remove_post_type_support('post','page-attributes'); //
// remove_post_type_support('post','post-formats'); //
}
add_action('init','my_remove_post_support');
@genepine That code appears to completely remove custom fields completely, which is the opposite of what I’m trying to do. ACF is already removing the default custom fields meta box, I’m trying to add that box back in.
https://codex.ww.wp.xz.cn/Function_Reference/remove_post_type_support is what you’re showing, that’s not what I want to do.
-
This reply was modified 7 years, 6 months ago by
tgiokdi.
Add this to your theme’s functions file.
add_filter(‘acf/settings/remove_wp_meta_box’, ‘__return_false’);
@84em that worked perfectly, thanks!
@tgiokdi You’re welcome. 🙂
@84em I am also having this same issue, but you solution is not working for me. I am getting a Warning: Division by zero error – do you have any other suggestions?