Home Forums Bee WordPress Theme Menu option open in new tab

This topic contains 11 replies, has 3 voices, and was last updated by  dfgutierrez 3 years, 4 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1762

    shortninja
    Participant

    Hi! I just purchased the theme 🙂

    How do you direct a menu bar item to open in a NEW TAB? Some of the menu options on my main navigation bar need to lead offsite but I don’t want them to open in the existing browser window, rather I would like them to open in a _blank tab.

    Thank you!

    • This topic was modified 3 years, 6 months ago by  shortninja.
    #1765

    shortninja
    Participant

    Also, I would like to apply this “open in new browser” feature to the social media icons on the main menu bar (and anywhere else they may appear) as well. Thanks again!

    #1770

    Johnny
    Participant

    Hi, thank you for purchasing our theme.
    please add this code at the bottom before ‘})’ in file js/custom.theme.js,

    jQuery('a.social_active').attr('target', '_blank');
        jQuery('li.menu-item a').attr('target', '_blank');

    ,
    Best

    • This reply was modified 3 years, 6 months ago by  Johnny.
    #1776

    shortninja
    Participant

    Thank you for the response! The hack code you sent works, however this code applies the “_blank” to ALL the menu buttons which won’t work well for this website. My client needs only a select few of the menu buttons to open in a new tab, and the rest need to function normally opening in the same browser. In other WP themes I’ve used there is a checkbox option on the menu item that you can select to have just that particular individual menu button open in a new browser, without effecting the rest of the menu. I’m guessing this is a pretty standard feature. Here is a screenshot of what it should look like: http://www.shannonames.com/dev2/wp-content/uploads/2013/12/menu_option_screenshot.jpg

    Is it possible the menu creation interface is an older version? If so how would I update this to the current version that provides this function?

    Thanks again for your help with this!

    #1778

    Johnny
    Participant

    Hi,
    When viewing the menu administration page, click on Screen Options (top right), and check the box labelled Link Target under the Show advanced menu properties heading. then option ‘Open link in a new window/tab’ will show,
    Best

    #1779

    shortninja
    Participant

    Yes! There is that pesky hidden feature. Thank you!! And thanks for the social media code earlier as well! Works perfectly ;o) xx

    #1863

    shortninja
    Participant

    Hi again…is there also an option to make the individual “buttons” from the button module to lead to a ‘_blank’ new tab? If not, do you have a custom code I can add and if so where do I add it? Thank you!

    #1868

    Johnny
    Participant

    Hi, please add below code at the bottom before ‘})’ in file js/custom.theme.js for button module click open new tab:
    jQuery('a.ux-btn').attr('target', '_blank');
    Best

    #1908

    shortninja
    Participant

    Thank you!!

    #2452

    dfgutierrez
    Participant

    Hi, the buttons in the promote module doesn’t open in new tab, how could I do this?

    #2461

    Johnny
    Participant

    Hi, please open file bee/functions/functions-view-module.php and find line 1577(or about), replace this
    pajx-click="true"
    with
    pajx-click="true" target="_blank"
    Best

    #2462

    dfgutierrez
    Participant

    Thanks, it works

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

You must be logged in to reply to this topic.