Support

Account

Home Forums Feature Requests Get fields only of a specific options page

Unread

Get fields only of a specific options page

  • I wondered if could be implemented a way to get all fields only of a specific options page.

    The problem is when you have registered more than on options page.
    For example, 3 options pages:

    1) ‘Header options’
    2) ‘Content options’
    3) ‘Footer options’

    Everytime you call get_fields(‘option’) you will have all registered options (header,content and footer options).

    But often you need only the footer options, or header options, and so on.

    A user should call get_fields(‘Header options’) to get only a specific set of options.
    The problem is that ‘Header options’ it’s not a unique id, but I could call

    get_fields($unique_name)

    where $unique_name could be the ‘id’ of the options page or the permalink, or a specific unique name added when creating the options page, i.e.:

    acf_add_options_page(‘label name’,’unique-name’);

    What do you think about that?

Viewing 1 post (of 1 total)

The topic ‘Get fields only of a specific options page’ is closed to new replies.