Creating Meta Box content from a Custom Post Type
-
I’m working on a personal site that tries to provide price comparisons for various local stores that carry a number of products.
I’ve already created two different post types:
1. Products
2. ProvidersProducts include the name of the product, a short name for the product, a unique SKU for each product, and a tag (Durable goods, perishable, etc).
Providers is a list of stores.
I need to create a metabox on the Provider admin page that populates a list of all products, grouped by tag, with a text box to enter pricing.
So below if I go to edit a provider named Joe’s Hardware, I would like the following to appear:
Durable Goods
Oven [PRICE] (Using this to represent a text box)
Refrigerator [PRICE]
Dishwasher [PRICE]Perishable Goods
Lilly of the Valley [PRICE]
Carnations [PRICE]
etc…The idea being that if and when I add a new product, ALL provider pages also get new fields to match.
Would I be able to echo out an array of the Product custom post types and also echo them as part of a variable/field name on the Provider page somehow?
Thanks in advance!
- The topic ‘Creating Meta Box content from a Custom Post Type’ is closed to new replies.