Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #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?


    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(){
    	jQuery('#top #header .mega_menu_title a').attr({target: '_blank', rel: 'nofollow'});
    add_action('wp_head', 'add_custom_script', 10);



    Solved that problem. Thanks


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


    Thanks for being there for support.


    Hi 702arts,

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

    Best regards,



    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!


    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



    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.


    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,


    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.



    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,

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.