After you’ve worked with WordPress for any extended amount of time, it’s likely that you’ve worked with post metadata in some capacity. Perhaps you’ve simply read metadata from the database, or maybe you’ve both written to and read from the database table, as well.
It can be a really powerful API whenever you need to associate certain information with your posts (or, if you’re into abstracting things even more, to your models).
That said, what happens when you want to include information from the metadata table but don’t have the convenience of plugins such as SearchWP or Relevanssi?
Furthermore, assume the use case is just for administrators and it’s only for the administration area of WordPress. That is, you want to search your posts from within the All Posts screen but you want to include the post metadata in the search criteria, as well.
What then?
Continue reading