Answer the question
In order to leave comments, you need to log in
Woocommerce specific attribute rule output loop?
Can anyone come across?
It is necessary to bring all the rules of one attribute to the main one (that is, outside the product or category).
The bottom line is that the "Brands" attribute has been created and it carries many values with a logo, name and description. This information will need to be operated on both the main and other custom pages.
Answer the question
In order to leave comments, you need to log in
Solution: (leave it here)
<?php
$brandTerms = get_terms('pa_brend', array('hide_empty' => 0, 'parent' =>0));
foreach($brandTerms as $brandTerm) :
echo $brandTerm->name;
echo $brandTerm->description;
echo $brandTerm->term_id;
echo get_field('logo_brand', $brandTerm);
endforeach;
?>
Hey!
Is created attributes "trademark" and there added "trademark names".
ACFom added a text field for the "trademark" taxonomy, which is also available when editing "trademark names".
For example, in the trademark he created "Nike" and filled in a custom field for nai, put a link to the official site.
Now you need to display the value of this custom field for all products that have the Nike attribute. Tell me which cycle to create, otherwise I’ve been muddling all day and everything is past ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question