Tagged: x
-
AuthorPosts
-
March 28, 2016 at 7:20 am #855010
Hi. I have followed the guidance provided in the forum as to how to add Loin/LogOut links to the x-topbar and the solution works – almost. My issue is that when I click on the LogOut link, it takes me to a LogOut confirmation page (see attachment). When I click on the LogOut link on that screen the url does change to show LogOut =”true”, but does not re-direct the user back to the home page (the behavior I am trying to accomplish).
site is at http://www.mysalus.org
Am I missing a step?
Thanks
March 28, 2016 at 7:39 am #855025Hi there,
The reason could be that you are using custom login URL, i.e., /sitelogin. Try changing your logout link to:
https://mysalus.org/sitelogin?action=logout&redirect_to=https%3A%2F%2Fmysalus.org%2F%3Floggedout%3Dtrue
Thank you!
March 28, 2016 at 9:43 am #855131Thanks! That code works perfect! One last tweak to this item. The LogOut Link show when logged out. When logged in, it only shows LogOut (perfect). I used the following css in my child theme which did do the proper show/hide before I updated with the above code. Is there a tweak I should make to the below css to get the hide LogOut urls not to show when logged out?
/* X_Topbar LogIn-LogOut */
.wp-login-url:before,
.wp-register-url:before,
.wp-logout-url:before {
content: ‘ | ‘;
}.wp-logout-url,
.logged-in .wp-login-url,
.logged-in .wp-register-url {
display: none !important;
}.logged-in .wp-logout-url {
display: inline !important;
}Thanks so much, you folks are great!
March 28, 2016 at 11:34 am #855273Hi there,
Thanks for updating. You need to add the class .wp-logout-url to the logout URL that you didn’t add so the code shouldn’t work.
You can also try this :
.logged-in .p-info > a:last-child { display: none; }
Hope this helps.
Cheers!
March 28, 2016 at 11:39 am #855279Hi There,
Please add the following CSS:
body:not(.logged-in) .x-topbar .p-info a:last-child { display: none !important; }
Hope it helps 🙂
March 28, 2016 at 12:17 pm #855332Worked perfect adding class to html.
Thanks again!
March 28, 2016 at 12:26 pm #855344You are most welcome. 🙂
-
AuthorPosts