Experience Level: Beginner to Intermediate PHP
In this tutorial – published June 8, 2016 – Pippin Williamson gives a great tour of how the WordPress core Metadata API works and how to go about extending it with minimal effort and maximum utility.
Full disclosure: I work for Sandhills Development, Pippin is my boss. 😉
- Review of core object types with metadata and available CRUD (create, read, update, delete) functionality
- Extending the Metadata API
- Creating the metadata table, including gotchas and code examples
- Interacting with metadata via core APIs
- Wrap up
Like some of the other “evergreen” content highlighted on Level Up WP, this post from Pippin Williamson stands the test of time in that it’s still very useful and relevant regardless of when it was originally published (2016).
Every WordPress developer should at least be aware of the mechanics for how the core metadata API works even if they aren’t extending it. It’s one of the few core APIs that is elegant in its simplicity: plug things in in just the way core expects and it just works.