I have registered options page Settings and there I have created various fields. Is there a way we could fetch all data in one call, like we can do using post_get_meta($id)? I am measuring number of queries so I am trying to lower that number.
Currently I use get_field(‘setting1’, ‘option’).
if( function_exists(‘acf_add_options_page’) ) {
acf_add_options_page(array(
‘page_title’ => ‘Settings’,
‘menu_title’ => ‘Settings’,
‘menu_slug’ => ‘settings’,
‘capability’ => ‘edit_posts’,
‘redirect’ => false
));
}
To reduce the number of queries for options set the options page to “autoload” values.
Values will need to be updated for this autoloading to take effect.