Tagged: x
-
AuthorPosts
-
September 7, 2016 at 8:39 am #1164451
krissy28Participanthi!
i have added this to sitea
dd_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2); function add_login_logout_link($items, $args) { ob_start(); wp_loginout('index.php'); $loginoutlink = ob_get_contents(); ob_end_clean(); $items .= '<li>'. $loginoutlink .'</li>'; return $items; }but it seems like it is not aligned with the menu and it is floating
pls assist thanks!
September 7, 2016 at 8:40 am #1164453
krissy28ParticipantThis reply has been marked as private.September 7, 2016 at 9:50 am #1164578
ThaiModeratorPlease provide us with your admin account so we can take a closer look.
Thanks.
September 7, 2016 at 10:00 am #1164592
krissy28ParticipantThis reply has been marked as private.September 7, 2016 at 10:22 am #1164621
krissy28Participantas you can see the login/logout and cart menu items are floating and not aligned..
September 7, 2016 at 11:07 am #1164691
krissy28ParticipantThis reply has been marked as private.September 7, 2016 at 11:27 am #1164714
ThaiModeratorHi There,
Please update your code to this:
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2); function add_login_logout_link($items, $args) { ob_start(); wp_loginout('index.php'); $loginoutlink = ob_get_contents(); ob_end_clean(); $items .= '<li class="ubermenu-item login-logout-link">'. $loginoutlink .'</li>'; return $items; }After that add the following CSS under Customizer > Custom > Global CSS:
.login-logout-link a { font-weight: bold; display: block; text-decoration: none; position: relative; padding: 15px 20px; color: #888888; }Hope it helps 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1164451 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
