Tagged: x
-
AuthorPosts
-
May 16, 2016 at 5:53 am #993347
ncfan2030ParticipantI am trying to add a menu in the top bar of my site:
http://lakeside.gkdevserver.com/
I see that the solution below is quite old and it does not seem to be working:
https://community.theme.co/forums/topic/menu-in-top-bar/
Is there a current updated solution here? Thanks in advance! 🙂
May 16, 2016 at 6:55 am #993420
Paul RModeratorHi,
You can try this.
1. Create file _topbar.php in wp-content/themes/x-child/framework/views/global and copy the code below into that file.
<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?> <div class="x-topbar"> <div class="x-topbar-inner x-container max width"> <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?> <?php wp_nav_menu( array( 'menu' => 'main-menu', 'container' => 'div', 'container_class' => 'x-topbar-nav', 'menu_class' => 'x-nav', 'link_before' => '<span>', 'link_after' => '</span>', 'depth' => 1, ) ); ?> <?php x_social_global(); ?> </div> </div> <?php endif; ?>Change main-menu with the name of your menu
2. Add this in Appearance > Customize > Custom > Edit Global CSS
.x-topbar-nav, .x-topbar-nav li { display:inline-block; } .x-topbar-nav li a { padding:5px 10px; }Hope that helps.
May 16, 2016 at 11:34 am #993876
ncfan2030ParticipantThis reply has been marked as private.May 16, 2016 at 12:40 pm #994037
DarshanaModeratorThis reply has been marked as private.May 16, 2016 at 1:06 pm #994075
ncfan2030ParticipantThis reply has been marked as private.May 16, 2016 at 1:44 pm #994139
DarshanaModeratorHi there,
Please provide us with your FTP credentials to check your code.
Thanks!
May 16, 2016 at 1:56 pm #994160
ncfan2030ParticipantThis reply has been marked as private.May 16, 2016 at 2:23 pm #994192
DarshanaModeratorThis reply has been marked as private.May 16, 2016 at 2:44 pm #994237
ncfan2030ParticipantThis reply has been marked as private.May 16, 2016 at 7:05 pm #994557
DarshanaModeratorHi there,
I have resolved your issues and now you should be able to assign links to your Topbar menu.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-993347 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
