MB Builder show products

Support MB Builder MB Builder show productsResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21126
    Dries B.Dries B.
    Participant

    I need to say the MB Builder is a useful tool and doing more than I could wish for. So far I've been able to display the custom fields I want in a page (front-end & back-end). All clear.

    But when linking the custom field to a product, I'm not able to display the info at the product page. I can modify the information at the admin panel, it's saving well and also reacting as it should. But it's just not listing the info at the front site. As there is not a "product" page to be modified, I don't know how to solve this.

    When checking Google and the META BOX website, the only page I have found linked to this issue is https://metabox.io/create-product-pages/ while is is one of the first things you're using META BOX for, isn't it. I'm feeling such a dummy now. hahaha sorry

    On top, the example I have found is not a real product page where you can find products. So in the end, it's not really what I am looking for...

    Is there a place where I can customize the settings of a product page so it's linking to the data of METABOX? Or where at the METABOX admin panel can I set things correct?

    Thank you for your help.

    #21128
    Long NguyenLong Nguyen
    Moderator

    Hi Dries,

    Suppose that you've created a post type name Product and it has slug product. After creating a meta box with custom fields and assign to the Product post type, you need to create a template file to display the field's value on the product page.

    Creating a file named single-[$custom_post_type_slug].php and put it into your theme’s folder, in this case the file name is single-product.php. Then use the helper function rwmb_meta() to show the field's value, follow this guide https://metabox.io/create-product-pages/ from step 3 to know how to do that.

    For more information on custom post type template, please follow this doc https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.