Meta Box Code Snippet Library
This is a community-maintained repository of code snippets that help modify the default behavior of Meta Box.
Snippets are organized into categories (folders) and each snippet is placed in its own file with a name that describes what it does.
Most files in this library are set up to be used within your WordPress theme or plugin:
- Click on the filename of the snippet you'd like to use.
- Click the "Raw" button (next to "Blame" and "History") at the top right.
- Save the page from your browser to your plugin or theme folder. Be sure to save it as a .php file.
- Open your theme's
functions.phpfile (or your plugin main
.phpfile) and include the new file. Or you can just copy and paste the code into your child theme's
functions.phpor place inside a custom functionality plugin.
Submitting Your Snippet
Please refer to the Contributing guidelines before submitting your pull request.
Proposing a Snippet
If there is a snippet you are unable to find and would like to propose get written, please open an issue and describe your need.
This is not a tutorial archive. Please see the plugin documentation if you're looking for instructions on how to implement these snippets (and others).
These snippets come with no guarantees. Due to the constant evolution of the Meta Box codebase, it is possible that the behavior of these snippets may change overtime. Find something broken? Let us know!