Home Forums General Issues Get a field object outside of the post context Reply To: Get a field object outside of the post context

  • outside of the search result loop, i have the search form like this :

    Sort by :
    – post type
    – post_type_1_checkbox
    – post_type_2_checkbox
    – …
    – date
    – 2001
    – 2003
    – …
    – language
    – french
    – english
    – ….

    the languages choices must sort all the languages select option on the field ‘language’. That is what i want 🙂

    because i am not on a post that is using this field (i am on the search page), i cannot use
    to sort all options available for ‘language’ field.

    get_field_object(‘language’) returns false because i am not on the scope of that field (this field is for posts not for pages).

    I want something to get the field structure regardless of the post id.
    Something like the export of acf fields, but with a function i can use on my theme/plugin