Home › Forums › Bee WordPress Theme › Menu option open in new tab
- This topic has 11 replies, 3 voices, and was last updated 12 years, 4 months ago by
dfgutierrez.
-
AuthorPosts
-
December 8, 2013 at 3:04 am #1762
shortninja
ParticipantHi! 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!
December 8, 2013 at 3:25 am #1765shortninja
ParticipantAlso, 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!
December 8, 2013 at 8:20 am #1770Johnny
ParticipantHi, 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');,
BestDecember 9, 2013 at 1:01 am #1776shortninja
ParticipantThank 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!
December 9, 2013 at 1:27 am #1778Johnny
ParticipantHi,
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,
BestDecember 9, 2013 at 2:22 am #1779shortninja
ParticipantYes! There is that pesky hidden feature. Thank you!! And thanks for the social media code earlier as well! Works perfectly ;o) xx
December 13, 2013 at 9:30 am #1863shortninja
ParticipantHi 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!
December 14, 2013 at 5:04 am #1868Johnny
ParticipantHi, 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');
BestDecember 19, 2013 at 8:20 am #1908shortninja
ParticipantThank you!!
February 20, 2014 at 5:14 am #2452dfgutierrez
ParticipantHi, the buttons in the promote module doesn’t open in new tab, how could I do this?
February 20, 2014 at 12:12 pm #2461Johnny
ParticipantHi, 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"
BestFebruary 20, 2014 at 2:26 pm #2462dfgutierrez
ParticipantThanks, it works
-
AuthorPosts
- You must be logged in to reply to this topic.
