This isn't a code question so much as a how would you do that kind of question.

What I can't figure out is how to relate businesses to the the products that they sell.

If I've got a custom post type and related taxonomy for a product (post type of product and taxonomies for price, quality, etc.). And I've got the same for businesses (custom post type and custom meta for location details).

How do I relate a product to a business?

If a user adds a product to the database (ie creates a new post) how can I associate this item with the store it was purchased at?

Any help is appreciated. Thanks.

1 Answer 1


Store the post id of the business in a post meta field of the product (_business_id), or create a custom table, because post meta look-ups are rather slow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.