Support

Account

Home Forums General Issues taxonomy field – filter to only show parents Reply To: taxonomy field – filter to only show parents

  • hi @elliot

    I’ve just recently implemented your suggestion. Yet, as @socki03 has correctly indicated, field['name'] does not yield the correct result. If I recall correctly it actually returns the whole object array.

    His suggestion of using strpos didn’t seem quite right to me (no disrespect) so I’ve done this.

    if ($field['key'] == 'field_524561acf76e5')

    This seems kosher (I hope) but hard-coding the field key seems to not be ideal. If I had to recreate that field (on another server for example) I’d have to update the key I imagine.

    Is there a way a specific field can be targeted using the field name?