Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Hook into ‘when user logs in’ [persistent login]

wp_login action is available.

The wp_login action hook is triggered when a user logs in by the wp_signon() function. It is the very last action taken in the function, immediately following the wp_set_auth_cookie() call.

Check this official documentation.

Related Posts:

  1. add filter login_redirect does not contain original requested redirect
  2. Correct method of redirecting user login
  3. How to redirect a unique link based on login status
  4. add_action(), add_filter() before or after function
  5. Trouble understanding apply_filters()
  6. What is the very earliest action hook you can call?
  7. wp_headers vs send_headers. When to use each?
  8. How many filter/action hooks are healthy?
  9. Earliest hook to reliably get $post/$posts
  10. Remove Editor From Homepage
  11. What does (10, 2) mean when used with add_filter
  12. Valid characters for actions, hooks and filters
  13. Advanced Custom Fields and Yoast SEO keyword analysis [closed]
  14. How to check if a hook is hooked or not?
  15. Editing ‘Password Reset’ E-mail
  16. Is it possible to use object in add_action?
  17. Store source permalink on XMLRPC calls
  18. How to make post and comment count unclickable with dashboard_glance_items hook
  19. Change “You are now logged out” text
  20. Hook into admin post list page
  21. Anyway to edit the titlebar of WordPress Widgets in the Admin area?
  22. How do I know if author field was changed on post save?
  23. Using hooks to place content in theme dynamically
  24. About Hooks and Filters
  25. PHP5, Inheritance, Singleton – action & filter hook limitations
  26. Should I use add_action(‘publish_post or add_filter(‘publish_post?
  27. Please explain me what the do_action does
  28. Apply the_title filter to post titles AND backend auto social-sharing plugin, but not nav menu
  29. add_action uses ‘echo’ add_filter uses ‘return’, why?
  30. Removing labels and tag on WordPress’s default login form
  31. changing variable through filters or action hooks
  32. Too many actions/filters!
  33. Apply a filter only once
  34. How to get list of all hooks of current theme / plugin?
  35. Making a class available via actions filters
  36. How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
  37. How to get current action?
  38. Customize user account activation message
  39. Conditionally call add_action depending on post_type?
  40. How do we check if the user is logging in or registering?
  41. how to change appearence of the content of default post list columns?
  42. Anonymous function is executed twice in wp_head while added from the_posts filter?
  43. Explanation for remove_filter used in the below code [closed]
  44. How to change the blog title with add_filter? details below
  45. How To Get User Data in Callback Function for pre_user_nicename?
  46. What’s the best way to split admin-only functionality in the theme’s functions.php file?
  47. Filter list by a unique meta value dilemma
  48. return values from hooks do_action and apply_filters, which is better
  49. How to get all the predefined do_action() calls from an active theme
  50. Is it possible to track down Actions and Filters?
  51. When to use actions and when to use filters
  52. Return a custom value in a function added to an action hook
  53. Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
  54. Same Conditionals Not Working on Two Different Hooks
  55. How to call a function or method that is Namespaced using another plugin
  56. How to change currency programmatically on creating order action?
  57. get_header and hook avoid normal call
  58. Removing an action, or dequeueing style – Both not working
  59. Can the wp_filter object hold multiple values with the same key
  60. Change username before login
  61. How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
  62. apply_filters/do_action tag characters limit
  63. Custom Login Errors and variables I can use
  64. Replace a word with a word in the URL string
  65. Is there a filter called ‘network_admin_init’?
  66. How to add ‘total’ value to custom column title on the posts list page
  67. Filter taxonomy admin pagination
  68. When to use add_action when registering/enqueuing scripts
  69. Insert term when page is published – avoid duplicates after edits
  70. Are there actions or filters I can use for Ajax calls?
  71. Capture post content before page renders
  72. Shortcodes — Using add_action, add_filter in the shortcode
  73. How to remove action with slashes and arrows?
  74. Can the wordpress color palettes by changed through Javascript?
  75. How do I use remove_action on an add_action that uses an array?
  76. How to properly modify WP Vary or any existing headers?
  77. Changing WordPress core without hacking core
  78. How to pass variables to custom filter from multiple functions
  79. Building a request processor for multi-page forms, etc using $_GET requests
  80. Comment search plugin
  81. How to customize the “Insert/edit link” popup box?
  82. Proper after_setup_theme and wp_head cleanup
  83. How to get a single hook from wp_head()?
  84. How can I output all apply_filters and do_action?
  85. How to allow code block in wordpress comments
  86. Add a filter inside an action init
  87. Filters on Login Page
  88. remove_action: how to access to a method in an child class?
  89. How can I change the email that is inside the default email texts of wordpress?
  90. Is it possible to apply_filter on a wp_ajax_ action?
  91. Filter for when the post is updated
  92. Add a filter to an action [closed]
  93. How do I hook my function to run only after submitting login form
  94. Change login CSS
  95. How to redirect non-logged in users to login with post_password_required()
  96. How can I specify the post status of an untrashed post?
  97. Filter get_page_by_path()
  98. why require – does not load filter
  99. Remove actions/filters that are set with create_function()
  100. Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
Categories filters Tags actions, filters, login
How to display custom post types AND regular posts separately on a shared taxonomy archive?
edit-tags.php in plugin admin menu hides when is the active page

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress