Created
February 4, 2019 20:24
-
-
Save ohyeahdev/73cdfeb67151ef33e7387fca5d92ed36 to your computer and use it in GitHub Desktop.
Crear sub-páginas de opciones con ACF Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Description: Creación de sub-páginas de opciones con ACF Pro. | |
* Tested with: ACF Pro V5.7 | |
* Author: @ohyeahdev | |
* Author URI: https://www.ohyeahdev.com | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'menu_title' => 'Opciones Generales', | |
'menu_slug' => 'ohyd_opciones_generales', | |
'redirect' => true | |
)); | |
acf_add_options_sub_page(array( | |
'page_title' => 'Ajustes de la Cabecera', | |
'menu_title' => 'Cabecera', | |
'parent_slug' => 'ohyd_opciones_generales', | |
'menu_slug' => 'ohyd_ajustes_cabecera', | |
)); | |
acf_add_options_sub_page(array( | |
'page_title' => 'Ajustes de la página de inicio', | |
'menu_title' => 'Página de inicio', | |
'parent_slug' => 'ohyd_opciones_generales', | |
'menu_slug' => 'ohyd_ajustes_pagina_inicio', | |
)); | |
acf_add_options_sub_page(array( | |
'page_title' => 'Ajustes del pié de página', | |
'menu_title' => 'Pié de página', | |
'parent_slug' => 'ohyd_opciones_generales', | |
'menu_slug' => 'ohyd_ajustes_pie_pagina', | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment