How to open WordPress Custom Menu links in a new tab
My wife is currently attending a blogging course at The Daily Post’s Blogging University.
One thing that was bugging her (and me) was that Custom Links in the WordPress Menu do not open in new browser tabs. The default behaviour is to open links in the same tab, which is useful for internal site navigation.
I explained to her that in plain HTML, we would just use a target such as “_blank” in our link tag, but I didn’t see how to apply my old fashioned knowledge to something so sophisticated and elegant as the WordPress Menu Manager.
Thanks to the wonderful Kathryn Presner, my wife just told me the solution to this puzzle: enable the link targets in your WordPress Screen Options!
Screen Options is this little menu at the top left in the WordPress admin interface we often forget to look at. Its content changes dynamically for every part of WordPress, and it includes a wonderful help system too – in case we ever get stuck.
So how do we do this new tab thing?
Head over to Appearance – Menus and select Screen Options at the top right. It will open a menu similar to this:
See the tick box that reads Link Target? Click it and close the menu again.
Now open one of your links (or create a new one) and find another magic tick box labelled Open link in a new window/tab.
Tick it and save your menu. Head over to the front page and see your link open in a new tab from now on. #result
Thanks to Julia and Kathryn for bringing this to my attention 😉