Support

Account

Home Forums ACF PRO Options Page And Menu Reply To: Options Page And Menu

  • Something like this would do it

    add_action('admin_menu', 'add_options_pages');
    function add_options_pages() {
      if (!function_exists('acf_add_options_page')) {
        return;
      }
      acf_add_options_page(array('page_title' => 'Theme Options'));
      // the following parent url will be auto generated by the above call
      // you can change the slug by specifying a slug for the page
      $parent = 'acf-options-theme-options';
      $sub_options_pages = array('Header', 'Navigation', 'Banner', 'Etc');
      foreach ($sub_options_pages as $title) {
        acf_add_options_sub_page(array('title' => $title, 'parent' => $parent));
      }
    }

    edited, didn’t need $options_page = on this line acf_add_options_page(array('page_title' => 'Theme Options'));'