Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1269294

    I would like to make the footer links open in a new tab. I have found some information about adding a ‘class’ to the link to make this work. Unfortunately it is not possible to add a class to items in the footer menu. How can I make this work?

    #1269337

    Hey StyleCreations,

    Can you try adding this PHP code in functions.php:

    function footer_links_in_new_tab(){
    ?>
    <script>
      (function($) {
        $(document).ready(function(){
          $('.sub_menu_socket a').attr('target','_blank');
        });
      })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'footer_links_in_new_tab');

    If it does not work, please give us a link to your site.

    Best regards,
    Nikko

    #1269347

    Unfortunately that does not work. I get the error page of WordPress when I add this to the functions.php.

    I will share the link etc. via the private content

    #1269348

    Hey,

    I went to Appearance > Menus and clicked “Screen options” on top right corner and enabled “Link Target” then edited your menu items and simply chose to open them in new tab.

    Please review your website :)

    Cheers!
    Yigit

    #1269349

    Thank you! I didn’t knew that option could be found over there… Thank you for the fast support

    #1269350

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/

    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Open footer menu links in new tab’ is closed to new replies.