Answer the question
In order to leave comments, you need to log in
How to display custom fields on WordPress woocommerce product page?
Good afternoon!
Please tell me, I am creating custom fields for products in WordPress WooCommerce, these fields are displayed on the page of the product itself, but how can I display them on the page where all the products are collected? This is the Shop page. And on the Shop page, you can filter products by category, and so that these same fields are also displayed there. I make custom fields using the plugin .
Thanks
Answer the question
In order to leave comments, you need to log in
I usually output like this:
<?php
$field = "meta_key";
$mechanism = get_field_object($field);
<?php echo $mechanism['label']; ?> - вывожу наименование поля
<?php echo $mechanism['value']; ?> - вывожу значение поля
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question