Home › Forums › Theone WordPress Theme › Disable Link and open new tab
- This topic has 5 replies, 3 voices, and was last updated 7 years, 6 months ago by
SeaTheme.
-
AuthorPosts
-
March 14, 2018 at 11:38 am #14766
Hi there,
How do I turn off a hyperlink when I’m choosing not to add one? At the moment, there are a number of points on my site that seem to be predetermined as something that should have a link, but because I have not entered one, when the link is clicked, the entire page reloads. For example, my client logo images have a link, but because I haven’t set one, it just reloads the page. I want to be able to turn the link option off where I’m choosing not to use it.
The same applies for links within the website. I don’t want some links to work, but there doesn’t seem to be an option to turn them off. For example, in team members, when you hover over a team member’s photo and click their name, it takes you to the post about that team member. I do not want the site to do this. How do I turn this off?
Also, how do I make links open in a new tab if I do want to use them. For example, my social media links will take my clients away from my website. I do not want this to happen. I would like all external links to open in a new tab.
Thanks so much,
Renae.March 15, 2018 at 2:21 am #14769Hi,
There is not the theme option for disable or open new tab link.
1. Use custom css to disable a link, bypointer-events: none. Find the className to set the css by develop tool of browser, like one menu item:

.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.com – Twitter – FacebookMarch 18, 2018 at 3:39 am #14801You can’t save changes made in the developer tool of websites though. How do I disable a link permanently?
March 18, 2018 at 6:27 am #14802You can not edit the code in develop tool , only can look for the className to set the css by develop tool, you need add the css into Theone / General Settings / Custom Css.
November 24, 2018 at 6:02 pm #17004Hello good afternoon.
With me it did not work by inserting the code in custom Css.
I would also like the social networking link to be opened in a new tab.
November 25, 2018 at 7:08 am #17008Please don’t put the
jQuery(...into Custom CSS.
Find a custom js plugin or use child theme to put the js code. -
AuthorPosts
- You must be logged in to reply to this topic.
