Tagged: x
-
AuthorPosts
-
September 21, 2016 at 1:31 pm #1185161
Hi guys; been going through the knowledge base for the last 4 days and I have not cracked this out. Please help me if you can. Here is the synopsis of the problem:-
– The child theme is set up properly with the _topbar.php file copied therein and edited to have ‘LOG IN’ which becomes ‘LOG OUT’ when client is logged in. (Screenshots attached). I have also gotten the cart set up there.
Thanks to Christopher, the php code looks like this:-
<?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 x_social_global(); ?>
<ul class=”x-nav”>
<li class=”menu-item current-menu-parent x-menu-item x-menu-item-woocommerce alignright”>
” class=”x-btn-navbar-woocommerce”>
<?php echo (x_woocommerce_navbar_cart()); ?>
<li class=”loginout alignright”>
<?php wp_loginout(); ?></div>
</div>
<?php endif; ?>What I would like to really achieve is this:-
1. to have ‘LOG IN’ in the top right of the top bar which links to the log in page
2. When user logs in, a welcome message is displayed where ‘log in’ was => ‘Welcome username’
3. When you hover over ‘Welcome username’ the following drop down menu shows => ACCOUNT | WISHLIST | LOG OUT
(an example screenshot is attached)Any assistance would be much appreciated.
Regards.
September 21, 2016 at 2:40 pm #1185290Thanks for writing in! 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.
September 21, 2016 at 4:52 pm #1185464This reply has been marked as private.September 21, 2016 at 4:59 pm #1185477Guys my reference point was from this website: http://plugins.yithemes.com/yith-woocommerce-recover-abandoned-cart/?preview
There LOGIN/REGISTER menu item is what I want to have in my top header.
Regards.
September 21, 2016 at 5:07 pm #1185478Guys, the first log in the string reads ‘Welcome username’ ; all other logins, the string reads:- ‘Hi username’
Cheers.
September 22, 2016 at 12:07 am #1185975Hello There,
Thank you for the clarifications!
Please check this thread for some guide:https://community.theme.co/forums/topic/how-to-have-login-profile-in-nav-bar/
What you can do is update some lines of your code and use this instead:
<ul class="x-nav"> <li class="menu-item current-menu-parent x-menu-item x-menu-item-woocommerce alignright"> <?php echo (x_woocommerce_navbar_cart()); ?> </li> <?php if ( is_user_logged_in() ) : ?> <li class="loginout alignright"> <?php wp_loginout(); ?> </li> <?php else : ?> <?php global $current_user; get_currentuserinfo(); ?> <li class="welcome alignright"> <a href="#">Welcome <?php echo $current_user->user_login; ?></a> <ul class="submenu"> <li><a href="account-link">My Account</a> <li><a href="wishlist-link">WISHLIST</a> <li class="loginout"> <?php wp_loginout(); ?> </li> </ul> </li> <?php endif; ?> </ul>
As this is all custom development, regretfully we won’t be able to assist further. Custom development is outside the scope of our support. We’re happy to provide advice and get you started in the right direction, but you would still be responsible for the implementation.
Please also keep in mind that we cannot support any modifications to the header other than minor cosmetic changes due to the fact that X is a highly dynamic theme with many elements being constructed on the fly based on options in the Customizer. Among these, the header is one of the more complex elements of the theme and structural modifications to it will likely lead to numerous layout problems as there are a lot of things to take into consideration because of X’s responsive nature. Taking all of this into consideration, these types of updates are out of the scope of our support as their involvement is simply too great and we are a very small team. While we would love to be able to assist all of our users with every customization request, the simple reality is that we cannot cater to every inquiry. Additionally, we will not be able to support any issues that might arise from modifications made to this area on your own.
Thank you for your understanding.
September 22, 2016 at 1:32 am #1186057This will not work but thanks for the try. I know the X team is building a header designer, let me hope it is not a matter of arranging menu items and the logo. I really hope you can incorporate a section for account login so that a user can log in from the same place (in the nabber or topbar) without having to go to a separate page.
September 22, 2016 at 1:36 am #1186063Hello There,
We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.
Thanks!
-
AuthorPosts