Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #326032

    I have a link on the main menu that doesn’t open in a new window or add a nofollow link even if I add those from the screen options. Is there a way I can adjust this so it opens in a new window and tells spiders not to follow?

    #326956

    Hey broshannon!

    Thank you for using Enfold.

    I’m sorry but you can’t apply these attributes on mega menu columns. However, you can apply it using this at the very bottom of functions.php:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    	jQuery('#top #header .mega_menu_title a').attr({target: '_blank', rel: 'nofollow'});
    });
    </script>
    <?php
    }
    add_action('wp_head', 'add_custom_script', 10);

    Regards,
    Ismael

    #846781

    Solved that problem. Thanks

    #846784

    Oops spoke too soon. Now all links open in a new window.

    :-)

    Thanks for being there for support.

    #847073

    Hi 702arts,

    Could you post a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #1078448

    Hello,

    I have the same problem. I used the code above. I have a mega menu with 2 entries and both entries are opening in a new tab, but only one of them should behave that way.

    Thank you for support!

    #1078456

    Hey Liebreiz,

    Please provide a link to the site/page in question. And which one is supposed to be opening in a new tab?

    Best regards,
    Jordan Shannon

    #1078704

    Hi,

    I checked it on my install – and cannot reproduce the problem.

    Could you try to disable all plugins and check ? Maybe a plugin conflict.

    Please create a WP admin account for us so we can check your backend.

    Steps:

    Dashbord -> Appearance -> Menus

    In Screen Options selected all checkboxes “Show advanced menu properties”

    In Menu element selectbox ink Target “New window” and in link Relationship (XFN) = “nofollow”

    Works for mega menu elements and normal menu elements.

    Best regards,
    Günter

    #1078948

    Hello,
    Thank you for your response. It only works if I switch off the mega menu option. This is ok for the moment. It looks better to me.
    Best Regards.

    #1079131

    Hi,

    Strange. But glad you found a solution that works for you.
    I will close the topic but feel free to come back if you need further assistance.

    Enjoy the theme and have a nice day.

    Best regards,
    Günter

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Menu Link won't open in new window with Mega Menu’ is closed to new replies.