Skip to content

Instantly share code, notes, and snippets.

@cameronjonesweb
Last active September 28, 2018 13:23
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 cameronjonesweb/35fca656016646dda0f1000fcdabf498 to your computer and use it in GitHub Desktop.
Save cameronjonesweb/35fca656016646dda0f1000fcdabf498 to your computer and use it in GitHub Desktop.
Replaces a settings subpage link with a link to the customizer or external URL
<?php
add_action( 'admin_menu', 'cameronjonesweb_add_menu_item' );
function cameronjonesweb_add_menu_item() {
global $submenu;
$url = 'https://cameronjonesweb.com.au';
$submenu['options-general.php'][] = array( 'My custom menu link', 'manage_options', $url );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment