22 Comments

  1. OriginalEXE

    It works great, nice idea, my thanks to the author, I imagine this will save me quite some time.

    Report

  2. Dr. J

    Hope they release it for Firefox as well!

    Report

  3. Joan

    Oh, nice little extension, I love it! Thanks so much, Kellen! :)

    Report

  4. Jason Lemieux

    Super cool and nicely done. Thanks, Kellan!

    Report

  5. Mickey Kay

    For those interested in this type of keyboard shortcut timesavers, I definitely recommend checking out Vimium, which provides a TON of useful shortcuts that can be used in tandem with any web app, including WP.

    Report

  6. AdelDima

    It not working with multi website or if you install wordpress in folder : if you have example.com/blog/ it will go back into example.com/wp-admin/.
    I hope they fix it , It’s a great idea.

    Report

    • Kellen Mace

      Hey AdelDima,

      This extension does work for subdirectory multisite installations and when WP is installed in a folder as long as it can tell that that’s the WP root directory. When you hit the keyboard shortcut, it works like this:

      1. Check if the links in the admin bar at the top are present (which are only there when logged in). If so, use those to switch to/from the admin.
      2. If not, search the links in the page source for instances of ‘/wp-content/’ or ‘/wp-includes/’. If at least one URL is found that contains either of those, assume that everything to the left of it is the WP root url, and use that the build the admin URL. So if your site’s URL is example.com/folder/ and you hit the shortcut, you’ll be prompted to login, then redirected to example.com/folder/wp-admin as long as at least one URL on the page contained ‘/wp-content/’ or ‘/wp-includes/’.

      So one example would be an HTML script tag that contains this: src=’http://example.com/folder/wp-includes/js/jquery/jquery.js?ver=1.12.4′

      Until you’re logged in, that’s the only way the extension can tell that the WP install is inside of a folder.

      I hope that helps out. I’m glad you like the idea of the extension :)

      Report

  7. Ahmad Awais

    Awesome Sauce! Loved it!

    Can you also add option to define custom admin urls? E.g. if my admin URI is /login instead of /wp-admin. This extension fails in that scenario!

    Report

    • Kellen Mace

      Ahmad,

      Using custom admin URLs is a bit of an edge case and would require adding more complexity in the form of a settings page where users could enter domains and their corresponding login paths, then checking against those every time a login or admin switch is taking place. Since I’m trying to keep the extension simple and lightweight, I don’t have plans to add that feature at the present.

      However, since it’s open source, you or anyone else can feel free to fork the original and add any custom settings you like – https://github.com/kellenmace/wp-admin-switcher/

      Glad you’re finding it useful! ?

      Report

  8. Luke Cavanagh

    Great idea!

    Report

  9. Thierry Pigot

    I have this functionalities with bookmarks since 2005!

    Report

    • Kellen Mace

      Thierry,

      That’ll do the trick if you’re just interested in switching to the WP admin, but this extension has these additional features:

      1. Switch from the admin back to the front end (to the specific post/page/CPT you were editing, if applicable).
      2. Supports subdirectory multisite installs and WP installs inside of a folder, such as example.com/site-name/wp-admin/.
      3. Sends you to the edit screen for the post/page/CPT you were viewing before you logged in/switched to the admin.
      4. Works via a keyboard shortcut or a click on the extension icon.

      To get all of those features (except #4) in a bookmark, you can use the code below. I think this may be especially handy on mobile devices where users don’t have the option to install Chrome extensions.

      Bookmark code (obfuscated & minified):

      Full bookmark source code:

      Report

  10. Kellen Mace

    Thierry,

    That’ll do the trick if you’re just interested in switching to the WP admin, but this extension has these additional features:

    1. Switch back from the admin to the front end.
    2. Supports subdirectory multisite installs and WP installs inside of a folder, such as example.com/site-name/wp-admin/.
    3. Sends you to the edit screen for the post/page/CPT you were viewing before you logged in/switched to the admin.
    4. Works via a keyboard shortcut or a click on the extension icon.

    To get all of those features (except #4) in a bookmark, you can use the code below. I think this may be especially handy on mobile devices where users don’t have the option to install Chrome extensions.

    Bookmark code (obfuscated & minified):

    Full bookmark source code:

    Report

  11. Kellen Mace

    For anybody following this project, I have implemented two of the features mentioned in the article:

    1. Now after logging in you will be directed to the admin post edit screen for the post/page/custom post type you were viewing before you logged in, if possible, or else the main admin screen.

    2. The cmd/ctrl+shift+A keyboard shortcut now works everywhere, even if the focus is on the omnibar/address bar.

    Report

  12. Mark

    Very cool. Thanks!

    Report

  13. Kellen Mace

    The final feature listed in this article has been added to the extension: the ability to set a custom keyboard shortcut. If you want to switch from using the default cmd/ctrl + shift + A to something else, here’s how you can do that:

    Go to the Chrome menu > More Tools > Extensions and check the “Keyboard shortcuts” link at the bottom. Find WordPress Admin Switcher on the list click the field next to “Switch to/from admin”. Enter your own custom keyboard shortcut.

    Report

Comments are closed.

%d bloggers like this: