Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.