Forum Replies Created

  • 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?

  • Hey John, any workaround for v5? This get_field_object('key'); does not work anymore globally, just for the current or latest post.

  • Hey guys, any update on this? I’m really in need of this feature that used to work on v4 with get_field_object(key) but is now linked to a specific post.

  • Quick heads up. Tested idflood‘s solution and it was working locally but not online (same Wp configuration, didn’t understand why) and got it working with AC‘s answer from December 19, 2014, both locally and online.
    If it can help.

  • Couldn’t get that code to work but the Get a field object and create a select form element code at the end of the get_field_object/ link was a success.

  • I’m struggling as well to retrieve this kind of data. Did you manage to find a solution?

Viewing 6 posts - 1 through 6 (of 6 total)