Worpress Submenu Page External Link

Okay so I’ve officially hit the “this is why other developers start a blog” point.

I’m tired of digging through bookmarks and code snippers to see how I’ve done something in the past and for most stuff GitHub is just not an option for simple snippets.

I wanted to add a submenu item to a Custom Post Type that pointed somewhere else.

Here’s how to do it:

[php light=”true”]

add_action( ‘admin_menu’ , ‘dlb_challenge_redirects’ );

function dlb_challenge_redirects() {
global $submenu;
$submenu["edit.php?post_type=dlb-challenge"][] = array(‘Manage Actions’, ‘manage_categories’ , "[URL GOES HERE]" );


*Caveat – The menu you’re adding this sub menu page to must already exist.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: