Trying to add an options page to your WordPress website with Advanced Custom Fields? All you may need is to add a function to your WordPress theme’s functions.php file.
3 answers
1
Registering the options page to ACF
To register the options page in ACF, you need to add a function to your WordPress theme’s functions.php file.
- Navigate to Appearance > Editor > Theme Functions from your WordPress Dashboard;
- Copy and paste in the function below;
- Click Update File to save the changes.
if ( function_exists( 'acf_add_options_page' ) ) { acf_add_options_page(); }
— Support WizardAnswer 1
0
Configuring the ACF options page
To configure your options page in ACF, you must do the following stops below.
- Register the options page using the function in the previous step above;
- Navigate to Custom Fields > Add New;
- Under the Location section, select Options Page;
- Click Publish to save the new page.
— Support WizardAnswer 2
0
Using ACF Options
To use ACF options, you can simply call the function below into your WordPress theme’s files.
the_field( 'example_options_page_field', 'option' );
This also works with get_field(); too;
— Support WizardAnswer 3