Capturing and displaying information using custom meta boxes
While the WordPress block editor did away with traditional meta boxes as its main interface building block when it was introduced in WordPress 5.0, plugin developers can still use them to easily create new sections when editing posts, pages, or any other post type that is configured to use the block editor, or on sites that are running the Classic Editor plugin.
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.
How to do it...
Follow these steps to add a custom meta box that will be used to display and capture information about the name and web address of the source materials used when writing a new post or page entry:
- Navigate to the WordPress
plugins
directory of your development installation. - Create a new directory called
ch5-post-source-link
. - Navigate to the directory...