Main menu link new window

Hello - can I change a link in my main menu to _target blank or new? Seems like I can’t - wanted to double check. It’s the Join/Log-in link in the main menu: http://hivekeepersau.com

Thank you

Hello there,

In the menu administration panel (Dashboard > Appearance > Menus), expand the Screen Options at the top right side; then enable Link Target checkbox. Then edit your menu item and check the Open link in a new tab option.

08%20AM

Regards,
Kharis

Hi Kharis

Thank you, but this suggestion on works on “pages”. We have it as a “custom link” and the check box to ‘open link in new window’ isn’t available. Is there another option?

custom link - screen shot of options

Many thanks

It should have appeared in Custom Link as well. I checked it again in my test site, and it does exist. Please double check yours.

58%20AM

Regards,
Kharis

That’s interesting. My screenshot I sent before was just taken today - it’s not appearing.

I have West-Pro theme version 1.25 - is there a new version I should look for?

thanks Kharis.

Hello there,

Any version of theme should work, because theme doesn’t eliminate core feature of WordPress. Probably third party script or one of your plugin interferes it. To find the suspect, you could try disabling all additional plugins at once, then check the menu item options. If it goes right, try enabling all plugins one by one to narrow down of which might be causing you this trouble.

Other alternative solution, you can also try to use jQuery code solution to achieve the same result.

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
(function($){

  "use strict"

  var menuLogin = $('ul.menu a[href*="app.hivekeepers.com/#login"]');
  if( menuLogin.length ) {
    menuLogin.attr('target', '_blank');
  }

})(jQuery);
  1. Update

Clear any applied cache before checking the result, as cache usually blocks new code addition to take effect. https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

Regards,
Kharis

Hi Kharis

Just so you know I have disabled every plug-in (13/13), cleared my cache and clicked the menu to see if would appear as an option - still not showing. So no plug-in interference by the looks of it.

36%20pm

I have tried with success the add with your JS - thank you.