Opening in a new tab

could you please tell how to make a link to the forum, to be opened in a new tab?this
http://mbsource.by/

Hello there,

It can be done by enabling the “Open link in a new tab” option in your menu item’s options in the menu administration (Appearance > Menus). By default, this option isn’t visible. So you have to expand the Screen Options at the top right of the screen. The tick the “Link Target” checkbox.

Regards,
Kharis

thank you so much!!!

My pleasure!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Hi,

Isn’t there a single place update option to control this behavior?

I have a dozen plus items and sub-items in my Menu and enabling it manually for each item is too tedious.

Hello there,

You can use jQuery code solution to set _target blank attribute to all menu items. It can be done by doing these steps:

  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($){

      $('.mainnav a').attr('target', '_blank');

    })(jQuery);

4 . Update

If site cache applied, you should flush it after adding a new code, otherwise it won’t take any effect.

Regards,
Kharis

Hi Kharis,

I tried the code you suggested, however, the changes are getting applied to all my Sidebar Widgets instead of the Menu items. So, I still need a tweak to make all my Menu items open in New Tab.

Thanks,
Govardhan

HI,

It’s working now, seems to be a caching issue, it took a while to reflect the change to Menu items.

Thanks!

Great!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis