Answer the question
In order to leave comments, you need to log in
ACF + WooCommerce?
I am creating a custom field called width for the product category. I'm trying to display content-product_cat.php in the template, but it doesn't work. Tried these options:
<?php the_field('width', bedroom); ?>
bedroom - category label
<?php the_field('width', Substituted category id); ?>
Please tell me what's wrong. Thanks in advance!
Solution:
<?php
$term_id = 47;
$term = get_term($term_id);
the_field('width', $term);
?>
Answer the question
In order to leave comments, you need to log in
It’s good to deliver at random, there are docks)
https://www.advancedcustomfields.com/resources/get...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question