Home › Forums › Front-end Issues › Retrieve all field options in admin › Reply To: Retrieve all field options in admin
Hey John,
acf_get_field()
sounds good but still not the right values. After investigation, here’s what i discovered:
When used in my theme file header.php acf_get_field retrieves those choices:
[choices] => Array
(
[casa] => Casa
[apartamento] => Apartamento
[loft] => Loft
[cobertura] => Cobertura
[duplex] => Duplex
[beiramar] => Beira-Mar
)
and when using the Export Field Groups to PHP tool in the admin, here’s what i get:
'choices' => array (
'ap' => 'AP',
'apartamento' => 'Apartamento',
'loft' => 'Loft',
'cobertura' => 'Cobertura',
'duplex' => 'Duplex',
'fazenda' => 'Fazenda',
'beiramar' => 'Beira-Mar',
'haras' => 'Haras',
'andar' => 'Andar',
'sala' => 'Sala',
'terreno' => 'Terreno',
),
All the choices.
Crazy thing, [key]
and [name]
are identical.
Any reason you could think of that would trigger this behavior?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.