Support

Account

Home Forums ACF PRO acf_add_options_page() undefined

Solving

acf_add_options_page() undefined

  • I’ve created countless sites with options pages and never had any issues. But this site, running the latest ACF PRO, says acf_add_options_page() is an undefined function.

    What possible reason could there be for this?

    The code I’m executing in the very top of my theme’s functions.php:

    function _hs_reg_acf_options_page() {
    	if ( ! function_exists( 'acf_add_options_page' ) ) { return; }
    	$option_page = acf_add_options_page( array(
    		'page_title'    => 'Settings',
    		'menu_title'    => 'Settings',
    		'menu_slug'     => 'general-settings',
    		'capability'    => 'edit_posts',
    		'redirect'      => false
    	) );
    }
    add_action('acf/init', '_hs_reg_acf_options_page');

    Removing the function_exists() wrapper is what throws the error, of course.

  • Small update: When searching for “acf_add_options_page” within the ACF plugin folder, zero results come up.

    Has this function been removed!?

  • *huge sigh*

    Nevermind. I didn’t realize that the site I’m working on (a project I recently took over) doesn’t even have PRO, but the free version. So I’ll be adding PRO shortly.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘acf_add_options_page() undefined’ is closed to new replies.