P
P
prosx2018-05-09 01:22:27
WordPress
prosx, 2018-05-09 01:22:27

Advanced Custom Fields - How to display field values?

The attribute "Brand" has been created on the site with values ​​​​(27 pieces at the moment),
The "Wordpress Editor" field has been added through the plugin - where size tables will be added later - which, in turn, should be displayed on the product card.
In simple words, if we go to the product card with the Anais brand, then the size tables of this brand are displayed there, which, in turn, we inserted in the brand values ​​in the "Wordpress editor" field.
Screenshots:
prntscr.com/jfgrky
prntscr.com/jfgt2n

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor Vorotnev, 2018-05-09
@prosx

Artibut is a custom taxonomy term. You need to get its ID or WP_Term object, I'm sure that won't be a problem. Having ID/WP_Term, you get the value of its field in one of the following ways:

get_field( 'field_name', $taxonomy . '_' . $term_id );
get_field( 'field_name', 'term_' . $term_id ); // Доступно только в версии 5.5.0 и выше
get_field( 'field_name', $term_object );

All this is in the docks .

O
Orkhan Hasanli, 2018-05-09
@azerphoenix

if I understand you you need this:
add the code to the desired template

P
Petr Volkhanov, 2018-05-09
@eprivalov

Or alternatively, you can display self-written shortcodes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question