zohaib87
8/2/2015 - 7:12 PM

ACF options pages.php

/**
 * ACF option pages
 */
if( function_exists('acf_add_options_page') ) {
	
  // Theme Options
  acf_add_options_page(array(
      'page_title' 	=> 'Theme Options',
      'menu_title'	=> 'Theme Options',
      'menu_slug' 	=> 'theme-options',
      'capability'	=> 'edit_posts',
      'position'      => 21,
      'icon_url'      => 'dashicons-nametag',
  ));
  
  acf_add_options_sub_page(array(
      'page_title' 	=> 'General Settings',
      'menu_title'	=> 'General',
      'menu_slug' 	=> 'general-settings',
      'parent_slug'	=> 'theme-options',
      'capability'	=> 'edit_posts',
  ));
  
  acf_add_options_sub_page(array(
      'page_title' 	=> 'Header Settings',
      'menu_title'	=> 'Header',
      'menu_slug' 	=> 'header-settings',
      'parent_slug'	=> 'theme-options',
      'capability'	=> 'edit_posts',
  ));
  
  acf_add_options_sub_page(array(
      'page_title' 	=> 'Footer Settings',
      'menu_title'	=> 'Footer',
      'menu_slug' 	=> 'footer-settings',
      'parent_slug'	=> 'theme-options',
      'capability'	=> 'edit_posts',
  ));
    	
}