Add a quick link to edit the website’s Front Page under the admin Pages menu

Create a Front Page link from the WordPress admin area which provides quick access to edit the homepage of your site


Adding a ‘Front Page’ link to the Pages menu of the WordPress admin area is a great way to provide quick access to edit the homepage, without having to sort through the numerous pages of your site.

To create this quick link, simply copy the snippet below into your functions.php or equivalent file and you’ll have a quick and easy way to edit the Front Page from the WordPress admin.

/**
 * Add Front Page edit link to admin Pages menu
 */

function bb_front_page_on_pages_menu() {
    global $submenu;
    if ( get_option( 'page_on_front' ) ) {
        $submenu['edit.php?post_type=page'][501] = array( 
            __( 'Front Page', 'barebones' ), 
            'manage_options', 
            get_edit_post_link( get_option( 'page_on_front' ) )
        ); 
    }
}

add_action( 'admin_menu' , 'bb_front_page_on_pages_menu' );

This code snippet is included within our WordPress boilerplate theme which we have developed over many years of creating bespoke, high quality WordPress websites to include just the essential tools developers need to enable rapid development with helpful elements such as this Front Page link.

A lightweight, intuitive WordPress theme to enable flexible developement.

  • Lighting-fast installer
  • Intuitive SASS structure
  • Bloat-free

Build with Barebones