Code Snippets

ACF Options Page

The options page feature provides a set of functions to add extra admin pages to edit ACF fields! Here's the code for enabling the ACF Options Page in your WordPress theme.

Advanced Custom Fields Options feature provides a set of functions to add extra admin pages to edit ACF fields! Here’s the code for enabling the ACF Options Page in your WordPress theme.

Add the following code snippet to your theme functions.php file

Basic

if( function_exists('acf_add_options_page') ) {
	acf_add_options_page();
}

More Detailed

/* INCLUDE ADVANCED CUSTOM FIELDS */
if( function_exists('acf_add_options_page') ) {
    acf_add_options_page(array(
        'page_title'    => 'enter name of site options page',
        'menu_title'    => 'enter the name as it should appear in the wp admin area menu',
        'menu_slug'     => 'my-site-options',
        'capability'    => 'edit_posts',
        'redirect'      => false
    ));   
}

Hire a WordPress Expert

Get hourly and project based theme customization, theme tweaks, and development help from an experienced Kelowna WordPress developer.  We’ve been building WordPress websites full-time for over a decade. We can help you.