Skip to content

Instantly share code, notes, and snippets.

@BhargavBhandari90
Last active October 25, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BhargavBhandari90/0342f92192aab75bf853b77cb7ef2bd6 to your computer and use it in GitHub Desktop.
Save BhargavBhandari90/0342f92192aab75bf853b77cb7ef2bd6 to your computer and use it in GitHub Desktop.
Add Setting page for ACF
<?php
/**
* Add Setting page for ACF
*
* @return void
*/
function buntywp_acf_setting_pages() {
// Bail, if anything goes wrong.
if ( ! function_exists( 'acf_add_options_sub_page' ) ) {
return;
}
acf_add_options_sub_page(
array(
'page_title' => __( 'Bunty ACF Settings', 'default' ),
'menu_title' => __( 'Bunty ACF Settings', 'default' ),
'parent_slug' => 'options-general.php',
)
);
}
// Add admin menu for custom ACF setting.
add_action( 'admin_menu', 'buntywp_acf_setting_pages', 90 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment