The options page feature provides a set of functions to add extra admin pages to edit ACF fields! Each admin page can be fully customized (see code examples below), and sub admin pages can be created too!
All data saved on an options page is global. This means it is not attached to any particular post or page, but is saved in the wp_options
table. This allows the data to be displayed on any page throughout the website (good for header and footer data)!
Template Usage
Basic Usage
To create an options page, simply open up your functions.php
file and add the following line of code:
functions.php
if( function_exists('acf_add_options_page') ) {
acf_add_options_page();
}
All the API functions can be used with the “Options Page’s” fields. However, a second parameter is required to target the options page. This is similar to passing through a $post_id
to target a specific post object. Read more
<p><?php the_field('field_name', 'option'); ?></p>
Installation
ACF PRO
The Options Page can be installed by purchasing a license for ACF PRO. On payment, you will receive a receipt from ACF and a user account allowing access to your downloads. Once ACF PRO is installed, enter your license key to enable plugin updates.
Plugin
The Options Page is no longer available as a separate plugin.