Tagged: x
-
AuthorPosts
-
January 30, 2017 at 6:22 pm #1351532
bradkerinParticipantHi there,
I have a login button working fine in my Header Navbar, and I am wanting to add the same button to the topbar (different text & link). Is there different code I need to add into the child theme functions.php file? I assume I also need to add something into the custom css.
You previously helped me put the button in my navbar, so was hoping you might be able to help me with this! https://community.theme.co/forums/topic/add-a-login-button-to-my-header/page/2/
Thanks so much for your help!
January 30, 2017 at 6:25 pm #1351533
bradkerinParticipantThis reply has been marked as private.January 31, 2017 at 1:29 am #1351900
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> Global CSS :
.topbar-link a { height: auto !important; padding: 10px 15px !important; margin-top: 15px; margin-left: 10px; border-color: #ffc018; background-color: #ffc018; color: white; text-shadow: none; border-radius: 100em; } .topbar-link a:hover { box-shadow: inset 0 4px 0 0 rgba(0,0,0,0.15); border-color: #f1b500; text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.65); }To display button in topbar, copy _topbar.php from framework/views/global and put it in the same path inside child theme, replace existing code with following :
<?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 if ( is_user_logged_in() ): ?> <?php echo do_shortcode( '[button type="real" shape="rounded" size="mini" href="'.wp_logout_url( get_permalink() ).'" title="Example"]Logout[/button]'); ?> <?php else: ?> <?php echo do_shortcode( '[button type="real" shape="rounded" size="mini" href="'.wp_login_url( get_permalink() ).'" title="Example"]Login[/button]'); ?> <?php endif; ?> <?php endif; ?> <?php x_social_global(); ?> </div> </div> <?php endif; ?>Hope that helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1351532 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
