Skip to main content

All Questions

Tagged with
0 votes
1 answer
25 views

Redirecting after login except for a specific page

I needed to redirect users after login and this was not a problem using an add_filter on functions.php, done, it works as expected. But now I need to avoid this redirect when the user login from a ...
zatarra's user avatar
0 votes
0 answers
11 views

How to modify username before logging in?

I know a solution exists for Wordpress admin from this Stack Exchange question: Change username before login However, while this works for logging into Wordpress directly, I am trying to use it for ...
Harish Prabhakar's user avatar
0 votes
1 answer
132 views

Changing login url

I've been following this guide on how to change your login url : https://www.malcare.com/blog/change-wordpress-login-url/ However, upon adding the logout, login and lost password hooks, I've noticed ...
dvm node's user avatar
0 votes
1 answer
271 views

Does wp_login hook fire on user registration?

My site is set to immediately login a user after they register. I'm writing a plug-in which needs to fire wherever a user logs in. If I order the wp_login hook, will this fire at user registration (...
AutoBaker's user avatar
  • 151
0 votes
2 answers
235 views

Is it possible to add the_content filter upon login?

I've added a wp_login action and it's getting executed. Then within that function, I'm adding a filter to the_content so that a script gets inserted upon certain conditions but it's not getting ...
Vic's user avatar
  • 1
1 vote
1 answer
1k views

Removing "There is no account with that username or email address." error message in "/wp-login.php?action=lostpassword"

Would like to find out if there is any way I could customize the wp_login page to remove the "There is no account with that username or email address." validation (show below) and any email/...
BBBBB86's user avatar
  • 23
1 vote
0 answers
20 views

How can I get my Script to work on the Login page?

I am trying to disable the right click feature, on the login page, using the following code: <?php function disable_right_click() { ?> <script> jQuery(document).ready(function(){ ...
Craig's user avatar
  • 358
0 votes
1 answer
456 views

Updating user meta data from external link, user not logged in

My login process is exactly like this: 1- user put email in the form 2- a link sent to email for setting password 3- user click on the link and redirect to website with code like this: https://www....
zEn feeLo's user avatar
  • 207
1 vote
1 answer
2k views

Adding body class to login page?

I can't figure out for the life of me how to add a custom body class to the WordPress login page. I found this thread, which suggests using the admin_body_class along with this one to check if the ...
nickpish's user avatar
  • 217
1 vote
1 answer
258 views

Change username before login

How to change username before submitting in login form ? I have used mobile number as username when a user registers in site. also I have removed 0 from the beginning of the mobile number. Now in ...
Javad Yousefi's user avatar
1 vote
4 answers
2k views

Custom action on login and "remember me"

I try to call a function everytime a user login to website. I succeeded with the wp_login hook for user who fill the login form. However I can't find a hook for an user which has the "remember me" ...
fdehanne's user avatar
  • 123
5 votes
3 answers
361 views

Init action hook running late after PayPal's return url?

I have process_ipn method that runs on init action hook. Looks like it is fired after PayPal returns to merchant. Under this method, I could find out the payment status such as completed, pending, ...
Sanzeeb Aryal's user avatar
1 vote
1 answer
2k views

add filter login_redirect does not contain original requested redirect

I link to WP's login page passing: redirect_to=play ...ttp://www.my.com/wp-login.php/?redirect_to=play">Click here... I use the value (in this case: play) as a flag, not an actual redirect url, ...
MLH's user avatar
  • 13
1 vote
1 answer
3k views

How to get session token of current user in wp_login hook?

I want to get current user's session token in the hook - wp_login. I have tried this code in functions.php: add_action('wp_login','test'); function test() { var_dump(wp_get_session_token()); //...
Faiyaz Alam's user avatar
0 votes
1 answer
919 views

Should `wp_login` be used since it's deprecated?

I am working on a little script that requires the user role right after logging in. I Figured wp_login() would be perfect. I read this runs after the login of a user and contains 2 parameter of which ...
Tristan .L's user avatar

15 30 50 per page