Skip to content

Instantly share code, notes, and snippets.

@ajithrn
Last active August 29, 2015 13:56
Show Gist options
  • Save ajithrn/9150920 to your computer and use it in GitHub Desktop.
Save ajithrn/9150920 to your computer and use it in GitHub Desktop.
Wordpress: acf option page customization
<?php
/**
* ======== acf option page customization ========
* @param [type] $settings
* @return [type]
*/
function my_acf_options_page_settings( $settings )
{
$settings['title'] = 'Page Title';
$settings['menu'] = 'Menu Title';
return $settings;
}
add_filter('acf/options_page/settings', 'my_acf_options_page_settings');
/**
* ============= Create a simple sub options pages =========
*/
if( function_exists('acf_add_options_sub_page') )
{
//simple way
acf_add_options_sub_page( 'Sub Page One' );
acf_add_options_sub_page( 'Sub Page Two' );
// advanced
acf_add_options_sub_page(array(
'title' => 'Page Title',
'parent' => 'options-general.php',
'capability' => 'manage_options'
));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment