Adding theme options with Advance Custom Fields Pro
- سُلَيْمَان بْن دَاوُوْد

- May 29, 2020
- 1 min read
Advance Custom Fields Pro allows you to create amazing option to create theme options you can start with basic structure by adding following lines of codes to themes functions.php
/*Theme Option*/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', 'redirect' => false )); acf_add_options_sub_page(array( 'page_title' => 'Theme Header Settings', 'menu_title' => 'Header', 'parent_slug' => 'theme-general-settings', )); acf_add_options_sub_page(array( 'page_title' => 'Theme Footer Settings', 'menu_title' => 'Footer', 'parent_slug' => 'theme-general-settings', )); }/*End Theme Option*/
Comments