Greetings,
I am having trouble calling acf_add_options_page from within a plugin. The call works fine from within a theme but it is never finding the function within the plugin,
Here is my code:
add_action( 'wp_loaded', 'my_options_page' );
function my_options_page() {
if( function_exists('acf_add_options_page') ) {
echo 'Found the Function!';
acf_add_options_page(array(
'parent_slug' => 'edit.php?post_type=adverts',
'menu_slug' => 'advert-settings',
'menu_title' => 'Settings',
'page_title' => 'Advert Settings',
'icon_url' => 'dashicons-admin-settings'
));
}
}
Anyone else have this issue?
Solved it, it was a new build and ACF wasn’t enabled *eyeroll*