ACF Options Page

A Site Options / Theme Options page allows you to build a top-level settings page with ACF custom fields.

/** * ACF Options Page * */ function be_acf_options_page() { if ( ! function_exists( 'acf_add_options_page' ) ) return; acf_add_options_page( array( 'title' => 'Site Options', 'capability' => 'manage_options', ) ); } add_action( 'init', 'be_acf_options_page' );

To access the data entered on this page, use the ACF function get_field( 'option_name', 'options' );. You could also use the WordPress function get_option( 'options_option_name' ); (prefix your option name with “options_” ).

You can also create option pages as subpages of existing pages in the WordPress admin. Here’s a tutorial on creating a Custom Post type settings page that appears under the “Projects” custom post type.

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk