One of the nicest APIs that the application offers is the WordPress Metadata API. It’s through this API that we’re able to take ideas such as posts, users, comments, terms, and more and store richer information that just the standard set of information.
Sure, there’s a lot to consider when taking advantages of these additional columns or fields as it relates to these concepts. But if you’re a beginner or someone who’s just starting to get deeper into the WordPress API, then I can’t recommend learning these APIs enough.
In two recent series for Envato, I cover these concepts in-depth.
Because of the nature of the API, I divided the topic into two series.
- The first series covers how to work with the basic WordPress Metadata API,
- The second series covers how to work with Term Metadata, which also includes a post explaining terms and taxonomies for those who are new to the content.
The goal was to provide a solid foundation for those who are completely new to these APIs and wanted to start at ground zero.
Posts, Users, and Comments
In this series, we’re going to look at how to work with WordPress metadata using the native WordPress APIs. By the end of it, you should be familiar with some of the advanced options relating to metadata and how to think creatively regarding using it in your work.
This series then breaks down the topics into:
- Understanding WordPress Metadata
- WordPress Post Metadata
- WordPress User Metadata
- WordPress Comment Metadata
If you’ve worked with the APIs long enough, then you’re likely familiar with how all of it works; however, if you’ve never worked with them before then there’s a slight learning curve.
Through each of the articles, I explain how the API works, and I give complete code examples for how to leverage each one. I also include the full source code that you can drop-in to any existing WordPress installation and begin exploring the code.
Terms and Taxonomies
I decided to create a separate series of articles for terms and taxonomies because there’s a little bit more to understand the relationship between the two before working with the metadata.
The series page explains:
In this two-part series, we’re going to be taking a look at taxonomies, what they are, the role they play in WordPress, and their relationship to terms. After this, we’re going to turn our attention to terms and how to work with the new term metadata API.
The series assumes you’ve never worked with terms or taxonomies before and aims to lay a foundation before exploring the metadata API. The articles are:
Because this is one of the newer metadata APIs that’s available to us as developers, so I wanted to make sure that the foundational information was covered well enough so that future articles can build on top of it.
There’s More To Come
The thing about the articles above is that because they are geared towards beginners and laying the groundwork for future articles, they don’t include usual practices for how to sanitize, escape, validate, all of the information going into and out of the database.
The examples that are used are simple enough, but not including that information isn’t an oversight. Instead, it’s going to be part of a follow-up series once this one has been a bit more established.
If you’re new to working with the WordPress Metadata API, and you’re looking to get a solid grasp on the topics through explanation and examples, then that’s exactly what this series aims to do.