-
AuthorPosts
-
April 8, 2015 at 10:02 am #244762
Hi there,
We’d really love to help you further on this but as this is a page created using a 3rd party plugin “Theme My Login”, regretfully, we cannot provide support for it as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, styling, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.
May 21, 2015 at 2:10 pm #278867This reply has been marked as private.May 21, 2015 at 9:28 pm #279126Hello There,
The logout link, login link is generated by WordPress itself. You can have a redirect in it. Please refer to this page:
https://codex.wordpress.org/Function_Reference/wp_login_url
https://codex.wordpress.org/Function_Reference/wp_logout_urlTo edit your members portal link, just replace this code and insert your link
'<a href="http://insert-your-link-here/" class="x-btn-navbar-my-account">'
Please let us know if this works out for you.
March 10, 2016 at 8:23 am #832098Hi There,
Is it also possible to have this Login/Logout Link changed in a way to have the Links in my topbar?
Would be awesome!Regards,
LisaMarch 10, 2016 at 3:48 pm #832629Hi Lisa,
Because this requires a template change, I’d advise that you setup 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.
Create _topbar.php file inside YOUR CHILD THEME -> framework -> views -> global and add this code in there:
<?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="buttons"> <li><a class="x-btn x-btn-red x-btn-real x-btn-rounded x-btn-regular" href="<?php echo wp_login_url(); ?>"><i class="x-icon x-icon-sign-out"></i> <span><?php echo __( 'Log In', '__x__' ); ?></span></a></li> <li><a class="x-btn x-btn-red x-btn-real x-btn-rounded x-btn-regular" href="<?php echo wp_logout_url(); ?>"><i class="x-icon x-icon-sign-out"></i> <span><?php echo __( 'Log Out', '__x__' ); ?></span></a></li> </li> </div> </div> <?php endif; ?>
Then add this in the Custom CSS:
.x-topbar .buttons { float: right; } .x-topbar .buttons li { display: inline-block; }
Hope it helps.
March 10, 2016 at 3:48 pm #832630Hi Lisa,
Because this requires a template change, I’d advise that you setup 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.
Create _topbar.php file inside YOUR CHILD THEME -> framework -> views -> global and add this code in there:
<?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="buttons"> <li><a class="x-btn x-btn-red x-btn-real x-btn-rounded x-btn-regular" href="<?php echo wp_login_url(); ?>"><i class="x-icon x-icon-sign-out"></i> <span><?php echo __( 'Log In', '__x__' ); ?></span></a></li> <li><a class="x-btn x-btn-red x-btn-real x-btn-rounded x-btn-regular" href="<?php echo wp_logout_url(); ?>"><i class="x-icon x-icon-sign-out"></i> <span><?php echo __( 'Log Out', '__x__' ); ?></span></a></li> </li> </div> </div> <?php endif; ?>
Then add this in the Custom CSS:
.x-topbar .buttons { float: right; } .x-topbar .buttons li { display: inline-block; }
Hope this helps.
March 11, 2016 at 1:24 am #833246Hi,
Thanks for your response.
I wanted to have a dropdown in my topbar, see attched picture1.
What I see with the provided code you see in picture2.
Also it needs to be a link that displays “login” when the user is not logged in, and “logout” when the user is logged in. “My account” should be displayed everytime.Thanks,
LisaMarch 11, 2016 at 1:29 am #833255Hi Lisa,
It’s not possible to show a dropdown menu in the topbar without deep CSS and template modifications, 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!
March 11, 2016 at 1:35 am #833265So is it possible to have a changing link in topbar?
Just like you see in picture, but with Login/Logout depending on the users status.March 11, 2016 at 1:58 am #833288Hi,
Yes, it’s possible.
You may replace the code in your _topbar.php with 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(); ?> <span class="loginout"><?php wp_loginout(); ?></span> </div> </div> <?php endif; ?>
Hope that helps.
March 11, 2016 at 2:09 am #833294Cool, it works!
So how can I change the position and have it looking like the other links I’m going to have in my topbar? I also have to change the login and logout url, think that is a wordpress adjustment.Best,
LisaMarch 11, 2016 at 2:36 am #833311Hi Lisa,
Glad it works. To help you better this time, please share your site URL. Then also give us a screenshot of what you want to achieve so the CSS suggestion will be exact.
Always,
XMarch 11, 2016 at 2:50 am #833322See my attachment.
In the top right corner you can see two links I defined in the topbar content area. Login is going to be deleted, but there will be other links like “help” for example.
So now I want to have the login/logout you provided to be integrated in this little menu (instead of the static Login-link)March 11, 2016 at 2:51 am #833325This reply has been marked as private.March 11, 2016 at 3:00 am #833333Hi Lisa,
We have to update the _topbar.php code above to 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' ); ?><span class="loginout"><?php wp_loginout(); ?></span></p> <?php endif; ?> <?php x_social_global(); ?> </div> </div> <?php endif; ?>
Hope this helps.
-
AuthorPosts