How to Find Meta Keys for Third-Party Plugins and Themes

Finding meta keys for third-party plugins and themes is not always straight-forward. This tutorial explains how you can find the key for any meta field available on the post edit page in your admin area. The plugin that we are going to use as a reference is WooCommerce, the popular e-commerce platform for WP. However the steps should be similar for any plugin.

Step 1: Set meta field values in the admin area

Let’s start by creating a new WooCommerce product in the admin area. As you can see in the screenshot below, the plugin offers dozens of meta fields in the admin area and almost all of them can be used in Frontend Publishing Pro.


Add some random values to all the fields that you would like to use with Frontend Publishing Pro. For instance, in the regular price field add 1056.5656 and choose a newly uploaded image for the product gallery.


Next, add a title for the product and hit publish. Our unique value 1056.5656 and the media ID of the gallery image has been saved to the wp_postmeta table against the meta keys that we are looking for. All that’s left to do is lookup that key using the meta value.

Step 2: Lookup meta keys

Now you need to run a database query. For this you can use PHPMyAdmin or a WordPress plugin like Adminer. The query that needs to be run is this:

SELECT meta_key FROM wp_postmeta WHERE post_id = POST_ID

Replace POST_ID with the ID of the post you just published. When you execute this query you will see a list of all the meta keys and their corresponding values for that post. Here’s what the query returns when run in the WordPress plugin Adminer:


You can see from the values that the required meta keys are _regular_price and _product_image_gallery.

One of the strengths of Frontend Publishing Pro is that it can be used with any third-party plugin or theme that uses WordPress post meta to store information. Hopefully this tutorial will help you get your hands on those hard-to-find meta keys.