After login, login button continues to go to the login screen
-
After login, the login button continues to go to the login screen instead of my account.
I added the login button to the site header using the code below:
???????????????????????if (is_user_logged_in ()) { ???echo "<div class = 'bft-btn-login'> <a href = '"; ??????echo home_url ('my-account'); / * Go to my account * / ???echo "'title =' My Account '> <i class =' ??fas fa-user '> </i> </a> </div>"; } else { ???echo "<div class = 'bft-btn-login'> <a href = ' ??????/ bftadmin / ???'title =' Login or Register '> <i class =' ??fas fa-sign-in-alt '> </i> </a> </div> "; }
???????????????????????
This way, if the user is logged in, the button will take you to the My Account page.If the user is logged out, they will be taken to the login screen.
However, after logging in, I am directed to the home screen of the site, and the button that should change to the My Account page continues to go to the login page.
If I refresh the page, the button is updated and works correctly.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘After login, login button continues to go to the login screen’ is closed to new replies.