• I am working on a clients site that has a coming soon page up so I can’t share the actual site, but hopefully someone can help me by hearing the issue.

    Basically I have three menu items on my site that link to a category, I tried it first via the “category” option for menu & it was opening in a new tab when I specified that it does not open in a new page.

    I tried it by using links to the category pages as well, and same problem.

    The other menu items don’t open in a new page.

    Any suggestions?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Have you set your local browser settings to open links in a new tab?

    Thread Starter fashionlushxx

    (@fashionlushxx)

    @pioneer

    sorry! Never got your response.

    I am not quite sure how you would do that- but it only happens on this particular site- so I am thinking my answer is no?!

    I am so so so confused and really don’t want to uninstall & reinstall the theme if I don’t have to.

    If I need to make the site live- I will, but just let me know first so that I don’t have it live for an extended amount of time.

    @fashion

    Appearance > Menus

    Then head up to “Screen Options” in the top right.
    This will drop down a few checklist options.
    Click the one that says “Link Target” Then refresh the page.

    Now when you open up each menu item from Appearance > Menus there should be an option called “open link in new window/tab”

    Make sure that box is unchecked.

    Can you provide a site link? I am here so make it live for a bit…

    Thread Starter fashionlushxx

    (@fashionlushxx)

    @endlyss

    It’s not clicked, already checked.

    @pioneer

    Site is now live- let me know if you come up with anything!! Thank you.

    https://www.feed-the-models.com

    Hmmmmm…here is the HTML:

    <ul id="menu-main-menu" class="menu"><li id="menu-item-29" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-29"><a href="https://www.feed-the-models.com">HOME</a></li>
    <li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-2 current_page_item menu-item-23"><a href="https://feed-the-models.com/about/">ABOUT</a></li>
    <li id="menu-item-52" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-52"><a href="https://feed-the-models.com/category/blog/">BLOG</a></li>
    <li id="menu-item-54" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-54"><a href="https://feed-the-models.com/category/healthy-eats/">HEALTHY EATS</a></li>
    <li id="menu-item-53" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-53"><a href="https://feed-the-models.com/category/work-it-out/">WORK IT OUT</a></li>
    <li id="menu-item-26" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-26"><a target="_blank" href="https://www.youtube.com">YOUTUBE</a></li>
    <li id="menu-item-21" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-21"><a href="https://feed-the-models.com/contact/">CONTACT</a></li>
    </ul>

    Some have target="_blank", some do not, but they do not relate to whether the link forces a new tab or page…

    I would rebuild my Menu and ask the theme provider (after testing site with all plugins deactivated).

    Ahhh…

    <script>var pltNewTabURLs = ["http:\/\/feed-the-models.com\/category\/blog\/","http:\/\/feed-the-models.com\/category\/healthy-eats\/","http:\/\/feed-the-models.com\/category\/work-it-out\/"];(function(){jQuery(function(e){return e("body").on("click","a",function(t){var n;n=e(this);if(e.inArray(n.attr("href"),pltNewTabURLs)>-1)return n.attr("target","_blank")})})}).call(this);</script>	</body>
    </html>

    Whatever is adding this is the likely culprit along with plugins using old jquery versions…

    Deactivate all plugins. Test site.
    If not that, switch to default unedited theme. Test site.

    Edit: adding this:
    More: https://github.com/markjaquith/page-links-to/blob/master/js/new-tab.coffee

    Thread Starter fashionlushxx

    (@fashionlushxx)

    thank you- it was a plugin! Whew- glad I figured that out, just need to how to get it to work since I need the plugin!

    Hey there.
    I’m having this same problem running Enfold theme with wordpress version 3.9.2 (I haven’t updated to 4.0 just yet as I’ve heard there are issues with losing everything).

    I have checked the menu link targets and they are all set to ‘same window or tab’ so all good there.

    I can see from above thread the issue was with a plug in..could you possibly share which one? I have not added any new plugins or updated any of them, but the problem has started for some reason. Weird.

    Any help would be great. The site I’m working on is hideseekers.com (this is not my own site, but one I’m working on).

    Thanks!
    WCC

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Nav Menu Items Opening in New Tab when they Shouldn't be’ is closed to new replies.