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.
[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!
© 2022 Advanced Custom Fields.