I’m currently reviewing the MySQL data structure for HivePress listings, and I noticed that when I run the following query:
SELECT meta_key, meta_value
FROM wp_postmeta
WHERE post_id = 477 //this is a known listing
ORDER BY meta_key;
— it returns some fields like hp_verified, hp_location, and hp_price_m2, but other expected fields such as the number of bedrooms and bathrooms are missing.
Could you clarify where fields like bedrooms, bathrooms, and other attribute values are stored? Are they saved under different meta keys, or are they handled via taxonomies instead?
They are stored in the same place. Please make sure that there are values for the listing ID in the query (try filling in the form on the frontend for this listing and saving it, and run the query again). Non-selective fields are stored in wp_postmeta in HivePress with hp_prefix, and selectable attributes are stored as taxonomy terms of hp_listing_attributename taxonomies Database Description « WordPress Codex
Your request is related to a premium product. Please add the license key to the account settings to access forums for your purchased products and get the Premium Support badge on your profile. If the support for your purchase has expired, please consider renewing it for assistance Renew Support | HivePress
Tags are stored in wp_terms, these are taxonomy terms hp_listing_tags. And using the code, you can use this function to get tags by taxonomy name get_terms() – Function | Developer.WordPress.org