Hi guys,
I have a Logo/Partner Element which you can find here: newsite.specialolympicsmalta.org (at the bottom where there are the sponsors). However, I did the option so that each and every sponsor link will open in a New Tab via enfold as you can see in the picture attached. However, they are not opening in new tabs. Can you please guide me properly?
https://dl.dropboxusercontent.com/u/182922063/Openinnewtab.PNG
Hey Matthew!
Can you please post us on private your backend details, so we can give it a look?
Thanks a lot for your understanding
Best regards,
Basilis
Hi Basilis,
Sure thing – backend details in the private section. Thanks a lot!
Hey!
Please turn on custom CSS field for ALB elements – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and edit your element and give it a custom CSS class and then add following code to Functions.php file in Appearance > Editor
function custom_class_link(){
?>
<script>
jQuery(window).load(function(){
jQuery('.your-custom-class a').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'custom_class_link');
Regards,
Yigit
Hi Yigit,
Thanks for getting back to me, however this didn’t work either so far. I managed to edit the ALB to take custom CSS classes, I named my element sponsorcontainer and I have the below as my code at the bottom of functions.php:
function sponsor_blank(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.sponsorcontainer a’).attr(‘target’,’_blank’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘sponsor_blank’);Z
Hey!
Your code was added in style.css file instead of functions.php file. I moved it there, please review your website now
Best regards,
Yigit
Thanks a lot Yigit, it’s working now :)
Appreciate all of your input!