sabineline
Forum Replies Created
-
I tried another attempt but can’t get it to work either.
I went to your plugin’s template folder and took the dashboard.php and made a copy of it.
I put that copy into [mytheme]/user-registration/myaccount/ and edited it.
Then I added something likeif (is_user_logged_in()) { echo 'USER_IS_LOGGED_IN: '; }to it but it doesn’t ever show up.
If I do the same with the my-account.php instead, it shows me the USER_IS_LOGGED_IN but obviously at the bottom of ALL tabs (including password and logout tab).
However I want this ONLY in the first tab, the dashboard tab.
Because if that works I can replace the echo-statement by a wp_redirect and my problem is solved.
Do you know what I am doing wrong?
Please help me as soon as you can since I’m a bit in a hurry with this task. 🙁- This reply was modified 5 years, 7 months ago by sabineline.
I tried doing something like this in the template for the loginpage:
$current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if (is_user_logged_in() && (!(strpos($current_url, 'logout') == true) || !(strpos($current_url, 'password') == true))) { ?> <meta http-equiv="refresh" content="0; URL='https://www.google.com'"/> <?php }My aim here was to have the redirect work via PHP on the my-account page (thanks to the template) which actually works but it also redirects from the logout and edit password tabs so I can’t logout any longer.