Created
June 15, 2013 03:16
-
-
Save halgatewood/5786733 to your computer and use it in GitHub Desktop.
WP Direct Link to Home Page in Admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DIRECT LINK TO HOMEPAGE FROM ADMIN MENU | |
if(get_option( 'page_on_front' )) | |
{ | |
add_action('admin_menu', 'hg_homepage_link'); | |
function hg_homepage_link() | |
{ | |
add_submenu_page( 'edit.php?post_type=page', 'Homepage', 'Homepage', 'manage_options', 'post.php?post=' . get_option( 'page_on_front' ) . '&action=edit' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment