Woocommere field in views

Support MB Views Woocommere field in viewsResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29706
    ErikErik
    Participant

    Hi,
    I want to make a view to display somme product on a homepage of a site.

    I achieve this

    {% set args = { post_type: 'product', posts_per_page: -1 } %}
    {% set posts = mb.get_posts( args ) %}
    {% for post in posts %}
    <h3>{{ post.post_title }}</h3>
    <p>{{ post.post_content }}</p>
    {% endfor %}

    How can i insert the other field like price and small description
    Thanks

    #29720
    Long NguyenLong Nguyen
    Moderator

    Hi Erik,

    You can use this plugin to know the custom fields of the product
    https://wordpress.org/plugins/woocommerce-store-toolkit/
    https://www.youtube.com/watch?v=d1JDfEGi4hM

    And follow this documentation to show the field value in the custom query https://docs.metabox.io/extensions/mb-views/#custom-query

    #29727
    ErikErik
    Participant

    Hi Long,
    Thanks for your answer and your support.
    Erik

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