Tagged: footer, footer menu, menu, open in new tab
Hey guys,
I have three footer menus here: newsite.specialolympicsmalta.org and I would like them to open up in a new tab. I’ve already ticked this as I saw that one should switch on this option from a previous post but, unfortunately, it didn’t seem to help out.
The ones that should open in a new tab are the following:
Special Olympics International
Play Unified
Coaching Guides
Any ideas please?
Hey Matthew,
this is WordPress’ default behavior (and nothing theme related). However, when you are on the menu page, click screen options at the top and check mark “Link Target”.
Now when under your menu items menu there should be a check box to “Open link in a new window/tab”
Best regards,
Andy
Hi Andy,
Thanks for getting back to me – didn’t know it was a WP default behaviour. As I pointed out in my first post, I’ve already done the ‘Link Target’/’Open link in a new window tab’ and unfortunately it’s still not working.
Any other suggestions please?
Hey!
Please add following code to functions.php file in Appearance > Editor
function remove_title_attr(){
?>
<script>
jQuery(window).load(function(){
jQuery('#footer a').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'remove_title_attr');
Regards,
Yigit
Thank you Yigit, that code did the trick.
Thank you both for taking the time in answering my query.
Hi!
You are welcome!
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)
Cheers!
Yigit