I am constructing a theme for Wordpress that uses PAGES for products for sale on a site. This Product will have properties like DESCRIPTION, PRICE that will be stored to custom fields.

I was wondering if it is possible to retrieve the values from the custom fields and forward them to a form which is stored in another wordpress page. This form is a request for quotation form that the user fills out.

Thank you.


When generating the form all you need is the post id of the product pages and you can use get_post_meta function to retive the information about that product , so basically you just need to pass the product post id. eg:

$price = get_post_meta($product_post_id,'price',true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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