Home Forums Theone WordPress Theme Disable Link and open new tab Reply To: Disable Link and open new tab

#14769

BWSM
Keymaster

Hi,

There is not the theme option for disable or open new tab link.
1. Use custom css to disable a link, by pointer-events: none. Find the className to set the css by develop tool of browser, like one menu item:
menu

.menu-item-2436 a {pointer-events: none;}

the title of team:
.team-item-title {pointer-events: none;}

2. Use custom js to open new tab for a link, find a custom js plugin or use child theme to put the js code.
Find the className for the element, like:

jQuery('.social-icons-footer a').on('click', 'a', function(e){ 
    e.preventDefault(); 
    var url = jQuery.attr('href'); 
    window.open(url, '_blank');
});

If you want to add 2 or more link, use comma like:

jQuery('.social-icons-footer a, .xxxx a').on('click', 'a', function(e){ 
    e.preventDefault(); 
    var url = jQuery.attr('href'); 
    window.open(url, '_blank');
});

Regards!
Bwsm – uiueux.comTwitterFacebook

Join Newsletter(FREE)

Subscribe to our newsletter to receive news & updates. We promise to not spam you, super promise!