Did you know? WP Menu Trick

19
2.9K followers

When working online, there feels like there is always something new to learn.

I have been building websites for three years now and I still learn new things I can do with WordPress.

One of those things has to do with the menu.

I never had need for this particular feature so I never looked into it. I just assumed it was not possible so never 'Googled' it.

One of my clients is very particular about her links and wants EVERYthing to open in a new tab - including her menu items.

As I said, I did not think it was possible.

Then I searched and guess what?

Of course it is possible and it doesn't take any custom coding!

Go to Appearance > Menus

Then look in the top right of your screen for Screen Options

Tick the Link Target box

Then look at each of your menu items you wish to open in a new tab

Tick this box

Make sure you save your menu again!

and that is it! Now this menu link will open in a new tab. :)

Cool trick ;)

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training

Recent Comments

12

Thanks for this!

Thnx, Angela.
M

This is good to know! Maybe for some menu links, I might use it...
Thanks, Gerlinde

It's definitely good that people know about this, and I respect the choice to do it. However, it's considered standard practice in HTML and coding to always open links in the same tab. This is because if people want a new tab, it's standard that they either right-click and choose that option or use a middle click on their mouse. Straying away from that standard can cause confusion and frustration.

I only say this because I used to make all external links open in a new tab. But after reading on it, and seeing code textbooks suggest not doing it, I became convinced that it's not the best thing to do.

I think it is great you took the time to do some research. :) I am an advocate of never taking other people's word but rather looking into things yourself!
As you said, it is a personal choice. For me, the only time I want my links to open in the same window is on my sales pages which go to an order form. :)

One of the best reasons to have your link open on a different page is they don't have to go looking for your website page it is still on the header and click back to it. So many times I have lost websites because they open in the same page and you can't get back to it.

Thanks Angela, yes I know that, can you tell me where the CSS class and link relationship exactly is for, what can you fill in there?

XFN Link Relationship - to my understanding - is just to show a relationship between your site and the link you are connecting it to, whether it is internal or external. I will admit I haven't really looked into it much so not sure about the 'why' you would want to do so.
https://codex.wordpress.org/Defining_Relationships_with_XFN
CSS clas is used to customize that one menu item. This article explains it pretty well I think https://premium.wpmudev.org/blog/customizing-the-wordpress-menu-with-custom-classes/

Thanks Angela, I will study the links, have a great day!

Yes this is what I use, I always have links in new windows. Have seen some claiming that this should only be used for external links but I do not see any logic in it. Besides, I just like it that way.

I prefer links to open in a new tab as well. Not just on my sites but any I visit. :)

Hi Angela, this is so useful! Many thanks, Sue :)

See more comments

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training