Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #651202

    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

    • This topic was modified 8 years, 5 months ago by MattDalli.
    #651295

    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

    #651427

    Hi Basilis,

    Sure thing – backend details in the private section. Thanks a lot!

    #651447

    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

    #651482

    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

    #651491

    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

    #651536

    Thanks a lot Yigit, it’s working now :)

    Appreciate all of your input!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Open Link in New Tab – Logo/Partner Element’ is closed to new replies.