Meta Box
Support › MB Views › Woocommere field in viewsResolved
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
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
Hi Long, Thanks for your answer and your support. Erik