Add a Menu Link (to a WordPress Page) in the Admin Menu/Sidebar

I am trying to add a link, in the Admin Sidebar, that links to one of the pages I’ve created in the PAGES section. For example, I’ve created an ABOUT page. So in the sidebar I would like a link to “About” that loads this link: post.php?post=7&action=edit

Why? I am trying to do this because I am working on a website that has 4 custom posts types and 3 pages. The custom post types have admin menu links, so I think it would be a better user experience if the 3 pages also had direct links in the sidebar, instead of needing to click PAGES and then seeing the list of 3 pages and having to click “EDIT” (and then I would hide the PAGES section link from the admin menu).

I was headed down this road, but it doesn’t seem to be what I want/need (I can’t get it to link to where I want): http://codex.wordpress.org/Administration_Menus#Inserting_the_Pages

Solutions Collecting From Web of "Add a Menu Link (to a WordPress Page) in the Admin Menu/Sidebar"

To dynamically add menu items you can use WP_Query, specifically get_posts or get_pages. Get pages is more consistent. Here’s an example to add all pages to the Pages admin menu. You can change paramaters to exclude, include, orderby, etc in the $args below. To change to a custom post type just change $custom variable to your post type name.

/*-----------------------------------------------------------------------------------*/
/* All Pages Dropdown List */
/*-----------------------------------------------------------------------------------*/

if ( !function_exists( 'admin_menu_links_to_all_edit_post_type_custom' ) ) {
function admin_menu_links_to_all_edit_post_type_custom() {
    if ( !is_admin() ) // Only Run if On Admin Pages
        return;

     $custom = 'page';  // Change this to your custom post type slug ( So for "http://www.example.com/wp-admin/edit.php?post_type=recipes" you would change this to 'recipes'  )



      // Full List of Paramaters - http://codex.wordpress.org/Template_Tags/get_posts
      $args = array(
          'orderby'          => 'modified', //Orderr by date , title , modified, etc
          'order'            => 'DESC', // Show most recently edited on top
          'post_type'        => $custom, // Post Type Slug
          'numberposts'      => -1,  // Number of Posts to Show (Use -1 to Show All)
          'post_status'      => array('publish', 'pending', 'draft', 'future', 'private', 'inherit'),
      );
      $types = get_posts( $args ); // Get All Pages
      foreach ($types as $post_type) {
      add_submenu_page( // add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );
          'edit.php?post_type='.$custom
        , esc_attr(ucwords($post_type->post_title)) // Get title, remove bad characters, and uppercase it
        , esc_attr(ucwords($post_type->post_title)) // Get title, remove bad characters, and uppercase it
        , 'edit_posts' // Require Edit Post/Page/Custom Capability
        , 'post.php?post=' . $post_type->ID . '&action=edit' // Get the page link by its id
        , '' // No function callback
      );    
      }
      wp_reset_postdata();
}
add_action('admin_menu', 'admin_menu_links_to_all_edit_post_type_custom');
}

if ( !function_exists( 'admin_menu_links_to_all_edit_post_type_custom_css' ) ) {
    function admin_menu_links_to_all_edit_post_type_custom_css() {
?>
<style type="text/css">
ul#adminmenu li.wp-has-submenu > ul.wp-submenu.wp-submenu-wrap {
max-height: 700px;
overflow-x: scroll;
}
</style>
<?php
   }
    add_action('admin_head', 'admin_menu_links_to_all_edit_post_type_custom_css');
}

Or to just add individually:

/*-----------------------------------------------------------------------------------*/
/* Single URL Submenu */
/*-----------------------------------------------------------------------------------*/

if ( !function_exists( 'single_submenu_dropdown_link_example' ) ) {
function single_submenu_dropdown_link_example() {
    global $submenu;
    $link_to_add = 'post.php?post=7&action=edit';
    // change edit.php to the top level menu you want to add it to 
    $submenu['edit.php'][] = array('About', 'edit_posts', $link_to_add);
}
add_action('admin_menu', 'single_submenu_dropdown_link_example');
}

This will add toplevel admin menus to your other pages:

/*-----------------------------------------------------------------------------------*/
/* Toplevel Page Menus */
/*-----------------------------------------------------------------------------------*/

if ( ! function_exists( 'toplevel_admin_menu_pages' ) ) {
function toplevel_admin_menu_pages(){
if ( !current_user_can('administrator') ) {  // If the user is not the administrator remove and add new menus
    remove_menu_page( 'index.php' );                  //Dashboard
    remove_menu_page( 'edit.php' );                   //Posts
    remove_menu_page( 'upload.php' );                 //Media
    remove_menu_page( 'edit.php?post_type=page' );    //Pages
    remove_menu_page( 'edit-comments.php' );          //Comments
    remove_menu_page( 'themes.php' );                 //Appearance
    remove_menu_page( 'plugins.php' );                //Plugins
    remove_menu_page( 'users.php' );                  //Users
    remove_menu_page( 'tools.php' );                  //Tools
    remove_menu_page( 'options-general.php' );        //Settings
    add_menu_page( 'Home', 'Home', 'edit_posts', 'post.php?post=39&action=edit', '', 'dashicons-admin-home', 6 );
    add_menu_page( 'About', 'About', 'edit_posts', 'post.php?post=15&action=edit', '', 'dashicons-editor-help', 7 );
    add_menu_page( 'Services', 'Services', 'edit_posts', 'post.php?post=24&action=edit', '', 'dashicons-admin-tools', 8 );
    }
  }
add_action( 'admin_menu', 'toplevel_admin_menu_pages' );
}
if ( !function_exists( 'wp_toolbar_frontend_admin_menu_links_extras' ) ) {

function wp_toolbar_frontend_admin_menu_links_extras($wp_admin_bar) {   
    if ( is_admin() || !is_admin_bar_showing() )
          return;

   if ( !current_user_can('edit_pages') ) 
        return;

    $wp_admin_bar->add_node(array(
        'id' => 'homepage',
        'title' => 'Home',
        'href' => admin_url() . 'post.php?post=39&action=edit' ,
        'parent' => 'site-name',
        'meta' => array(
            'class' => 'homepage'
        )
    ));

    $wp_admin_bar->add_node(array(
        'id' => 'aboutus',
        'title' => 'About',
        'href' => admin_url() . 'post.php?post=36&action=edit' ,
        'parent' => 'site-name',
        'meta' => array(
            'class' => 'aboutus'
        )
    ));

    $wp_admin_bar->add_node(array(
        'id' => 'services',
        'title' => 'Services',
        'href' => admin_url(). 'post.php?post=32&action=edit' ,
        'parent' => 'site-name',
        'meta' => array(
            'class' => 'services'
        )
    ));
}

    add_action('admin_bar_menu', 'wp_toolbar_frontend_admin_menu_links_extras', 99);

}