Skip to content

Instantly share code, notes, and snippets.

@corypratt
Created April 9, 2019 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corypratt/d5ef0e10b452a143bbcb78d0336f6379 to your computer and use it in GitHub Desktop.
Save corypratt/d5ef0e10b452a143bbcb78d0336f6379 to your computer and use it in GitHub Desktop.
Create ACF option page
<?php
/*
*
* This code should go in your functions.php
*
*/
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts'
));
acf_add_options_sub_page(array(
'page_title' => 'Global CTA\'s',
'menu_title' => 'Global CTA',
'parent_slug' => 'theme-general-settings',
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment