Answer the question
In order to leave comments, you need to log in
How to display a list of categories with custom fields?
Hello. It is required to implement a similar thing
. I'm thinking of doing it like this:
1) Offices, Warehouses, Trading areas - these will be headings, there will be records in them. This means that in order to display the characteristics of the headings on the Commercial terms page, you need to give them arbitrary fields. OK. Made arbitrary fields in ACF.
2) Next, you need to somehow display on the page a LIST of headings (not records, but headings) with their arbitrary fields. And I don’t understand how, all I found on the Internet is the output of a list of headings
. How can I implement such a thing?
Answer the question
In order to leave comments, you need to log in
$terms = get_categories();
foreach ( $terms as $term ){
echo ' Название рубрики: ' . $term->name;
echo 'Мета поля: ';
var_dump( get_term_meta( $term->term_id ) );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question