Hiding the Custom Fields section in the post editor
After having full control over which meta boxes are shown when creating custom post type editor controls and putting together plugin configuration pages, things are a little different when it comes to altering the basic post and page editors. More specifically, instead of choosing which meta boxes to display, the editor sections created by WordPress need to be removed to tailor the user experience.
Getting ready
You should have access to a WordPress development environment, either on your local computer or a remote server, where you will be able to load your new plugin files.
If you're using the default block editor to edit your posts and pages, follow these steps to display the Custom Fields section in the post editor:
- Edit a post.
- Go to the drop-down menu at the top-right corner of the editor (shown as three vertical dots, next to the Publish button and the gear icon).
- Select the Preferences menu. ...