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

Filter page title (displayed in browser tab) of wp-login

I don’t see a filter in wp-login for the title, but it does use __() so you might be able to use the gettext filter like:

add_filter('gettext', 'wpse_214367_change_login_title', 20, 3);

function wpse_214367_change_login_title( $translated_text, $untranslated_text, $domain ) {

     if( "Log In" == $untranslated_text  )
            $translated_text = "My New Title";

   return $translated_text;
}

EDIT: Please try this and let me know if it works. May also need to add a check to make sure you are on wp-login.php page

 add_filter('gettext', 'wpse_214367_change_login_title', 20, 3);

function wpse_214367_change_login_title( $translated_text, $untranslated_text, $domain ) {
    static $count=0;
     if( "Log In" == $untranslated_text AND $count === 0 ){
            $translated_text = "My New Title";
            $count++;
      }
   return $translated_text;
}

Related Posts:

  1. Remove description from on Home
  2. Editing ‘Password Reset’ E-mail
  3. Filter Widget Title Wrap
  4. Don’t replace “|” with Empty String (“”) when generating slugs from title
  5. Change “You are now logged out” text
  6. Anyway to edit the titlebar of WordPress Widgets in the Admin area?
  7. Alter only the page title, not the post titles within
  8. Changing document title only on a custom page template
  9. Filtering ‘the_title’ with option to return subhead?
  10. wp_title() empty on a static front page
  11. Can’t change the title tag with wp_title filter
  12. Setting title using wp_title filter
  13. Removing labels and tag on WordPress’s default login form
  14. Add a Span Around a Product Title in WooCommerce [closed]
  15. Customize user account activation message
  16. How do we check if the user is logging in or registering?
  17. Wrap h1-h6 in a div
  18. add filter login_redirect does not contain original requested redirect
  19. Change username before login
  20. Variables in post title
  21. Custom Login Errors and variables I can use
  22. Is it possible to use multiple spaces in title?
  23. WP action/filter to modify title before header output and article output?
  24. Correct method of redirecting user login
  25. Filters on Login Page
  26. How can I change the email that is inside the default email texts of wordpress?
  27. How do I hook my function to run only after submitting login form
  28. Change login CSS
  29. How to redirect non-logged in users to login with post_password_required()
  30. Filter media upload attachment meta
  31. Use of comment_reply_link_args filter
  32. Strip $before & $after strings from a page title
  33. How to redirect a unique link based on login status
  34. add_filter( ‘the_title’ gets through this if statement twice
  35. Filter Post Title without affecting screen-reader-text
  36. Modify WordPress Page Title ()
  37. login_url filter creates permanent wp-admin -> wp-login redirection loop
  38. How to filter page title for certain page?
  39. Login logout below menu bar
  40. get_the_archive_title hook unwanted changes!
  41. Hook into ‘when user logs in’ [persistent login]
  42. Hide H1 Title using the_title filter
  43. Admin filter/error if post title is too long
  44. Auto append text after the title?
  45. Change password reqts with NO plugin without breaking resetpass link?
  46. ‘Problem’ with login_redirect filter – why does it lose the redirect_to parameter
  47. wp reset password page – head inline script
  48. Disable emojicons introduced with WP 4.2
  49. How to remove a filter that is an anonymous object?
  50. WordPress hooks/filters insert before content or after title
  51. How to add defer=”defer” tag in plugin javascripts?
  52. add_action(), add_filter() before or after function
  53. apply_filters(‘the_content’, $content) vs do_shortcode($content)
  54. How do filters and hooks really work in PHP
  55. Trouble understanding apply_filters()
  56. What is the very earliest action hook you can call?
  57. How would one modify the filtering Gutenberg applies to pasted content?
  58. How can I modify the WordPress default widget output?
  59. Add custom options to the wplink dialog
  60. Remove classes from body_class
  61. what is __return_false in filters
  62. Explanation for apply_filters function and its variables
  63. Gutenberg: Is there a way to know if current block is inside InnerBlocks?
  64. How to reorder billing fields in WooCommerce Checkout template? [closed]
  65. Insert HTML just after tag
  66. the_content and is_main_query
  67. Issues with title-tag and document_title_parts
  68. Changing WooCommerce Display Price Based on User Role & Category [closed]
  69. How to add a custom CSS class to core blocks in Gutenberg editor?
  70. How to show page content in feed?
  71. wp_headers vs send_headers. When to use each?
  72. Filter any HTTP request URI?
  73. How to Pass External Variables to Filters/Actions
  74. How to filter users on admin users page by custom meta field?
  75. Filter by one custom field, order by another?
  76. Apply the_title() filter in post & page title, but not in menu title
  77. Not able to change wp_title using add_filter
  78. How to appending to the_content using add_filter with custom post type?
  79. Query WP REST API v2 by multiple meta keys
  80. No filter of code on switch from html to visual editor, how?
  81. Sanitize and data validation with apply_filters() function
  82. How to modify posts_where filter only for the search query
  83. How to hook a filter to catch get_post_meta when alternate a custom field output?
  84. How to get shortcode’s input values inside a filter?
  85. Removing Image and Caption Dimension Attributes
  86. How to wrap oEmbed-embedded video in DIV tags inside the_content?
  87. How to bulk delete all users with no posts?
  88. How many filter/action hooks are healthy?
  89. WordPress 3.9 – Trouble Editing TinyMCE 4.0
  90. Changing JPEG compression depending on image size
  91. How to add filter with 2 args?
  92. Why is javascript allowed in my post content?
  93. How to use update_{$meta_type}_metadata filter to modify meta value
  94. How to wrap an element around an iframe or embed in content automatically?
  95. Filter specific shortcode output?
  96. WordPress Internal @ Mentions
  97. How to add headers to outgoing email?
  98. Earliest hook to reliably get $post/$posts
  99. Insert new element to array with add_filter
  100. LESS CSS enqueue_style with add_filter to change rel attribute
Categories filters Tags filters, login, title
If user is logged in not working
Problem copying WordPress site to localhost server

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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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