How to fix if custom fields option not showing in dashboard posts or pages ..
Here are Steps to Follow:
- Simply Login to your website and edit any post from the listed posts.
- First check if it is not unchecked by default in dashboard by click on Screen Option .. right side of screen.
If the Custom field not showing in “Screen Option” section on top then follow these steps to add custom filed option to any custom post type .
Like here..
if you don’t know how to create custom post then follow this previous post to know more..
Here is the code of custom post type..
<?php function nst_custom_post() { register_post_type( 'Movie', array( 'labels' => array( 'name' => __( 'Movie' ), 'singular_name' => __( 'Movie' ) ), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'movie'), 'supports' => array('title', 'editor','thumbnail','excerpt','custom-fields'), ) ); } // Hooking up our function to theme setup add_action( 'init', 'nst_custom_post' ); ?>
Find your post code in functions.php file if its added recently and just add ‘custom-fields‘ option to ‘supports’ line .. like above to show in post dashboard.
Note : if you don’t know how the custom post is added in your website then here is simple way to add custom filed.
add this function to your active theme functions.php file ..
add_post_type_support( 'my_post_type', array(
'excerpt', 'custom-fields',
) );
Just change the my_post_type to your post type.. then save this..
Now refresh that edited post page.. Custom Field option will appear now..
That’s it.. 😉 Thanks 👍
Thanks a lot Narender
Thanks @Jamesfrine
Really helpfull.. thank man.
Thanks Abermotwah .. 😉
Thanks for sharing with us!