-
AuthorPosts
-
December 24, 2015 at 1:59 pm #720435
mthomas91ParticipantHi,
Sorry, how do I add a class to the menu items?
Thanks,
MilesDecember 24, 2015 at 4:08 pm #720536
JadeModeratorHi Miles,
Please see screenshot for guide.

Hope this helps.
January 25, 2016 at 10:36 am #763275
nphoughParticipantHello – I just came across this as I was looking for the same info about creating a top bar menu. This works well and thank you for continuing to update it!
My question is: if I create nested menu sub-items in top-menu they are displaying all the time instead of just on mouse over. Is there a way to make these items drop down on mouseover like in the regular menu? Thank you!
January 25, 2016 at 2:50 pm #763670
FriechModeratorHi There,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
February 11, 2016 at 4:56 pm #791851
pbeaucheminParticipantHi There,
I implemented the code on the first page of this thread and created a page called “_topbar.php”.
Can you please tell me how I get the nav in the topbar to be right justified with the main nav?
Thanks
February 12, 2016 at 12:33 am #792424
LelyModeratorHi There,
To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
April 17, 2016 at 5:13 pm #887181
CodetrixNZParticipantHi Team,
I’ve read through this thread and it’s been exactly what I was after thank you, great detailed replies!
In my new Topbar Menu I’d like to have a Login/Logout link that dynamically changes depending if the user is logged into their account or not.
Is that possible?
CheersApril 18, 2016 at 2:07 am #887639
Rue NelModeratorHey @CodetrixNZ,
Thanks for updating this thread!
In my new Topbar Menu Iโd like to have a Login/Logout link that dynamically changes depending if the user is logged into their account or not. Is that possible?Yes it is possible. And since what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that wonโt be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Add Login/Logout link shortcode // ============================================================================= add_shortcode( 'wp_loginout', 'wp_loginout' ); // Allow shortcodes in the topbar content // ============================================================================= function allow_custom_shortcodes($contents) { $contents = do_shortcode($contents); return $contents; } add_filter('x_option_x_topbar_content', 'allow_custom_shortcodes'); // =============================================================================And then, please go to your customizer, Appearance > Customize > Header > Miscellaneous and turn ON the topbar content. You can then insert this shortcode:
[wp_loginout]I would loved to know if this has work for you. Thank you.
April 19, 2016 at 5:26 pm #890872
CodetrixNZParticipantBingo! That was exactly what I was after thank you very much!
April 20, 2016 at 5:50 am #891567
ZeshanMemberYou’re most welcome! ๐
April 20, 2016 at 3:07 pm #892414
hipneckParticipantThanks to the code in this thread, I was able to add a WooCommerce Topbar Menu to Integrity. Yay, me! ๐
I created the WooCommerce account & dynamic login/logout links using WooCommerce Menu Extension (available at WordPress.org). I think WooCommerce has basic page links you can add to your menu but I’m not sure that they’re dynamic based on login status (haven’t checked).
Thanks guys for all your support!
April 20, 2016 at 11:57 pm #893017
John EzraMemberYouโre most welcome! ๐
May 23, 2016 at 2:53 pm #1005890
michaellanfieldParticipantThis reply has been marked as private.May 23, 2016 at 7:58 pm #1006267
FriechModeratorHi There,
You can write the menu in HTML and paste it on the Topbar Content.
<ul class="custom-menu"> <li><a href="#">menu1</a></li> <li><a href="#">menu2</a></li> <li><a href="#">menu3</a></li> <li><a href="#">menu4</a></li> <li><a href="#">menu5</a></li> </ul>And then a custom css to float it on the right.
ul.custom-menu {float: right;} ul.custom-menu li { display: inline-block; padding: 0 8px; }Hope it helps, Cheers!
May 23, 2016 at 10:29 pm #1006505
michaellanfieldParticipantThank you it worked, but is there a way to create a menu with sub menu?
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-153490 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
