• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Damien Carbery - Website Development

Getting You Online & Keeping You There

Getting You Online & Keeping You There Get Started
  • Home
  • Services
  • Maintenance Plans
  • Portfolio
  • Blog
  • About Me
  • Contact
You are here: Home / Website Development / Disable language dropdown on login page

Disable language dropdown on login page

Published: January 26, 2022 (Updated: March 7, 2022)

Disable language dropdown on login page
Disable the language dropdown on the login page as it may confuse some users/admins.

WordPress 5.9 introduced a language switcher on the login page. I saw it on a site I maintain as a volunteer. I know that the other site admins could be confused by this new item on the login page so I looked at how to disable it.

A one line plugin

Before reading the above article I searched the WordPress 5.9 source for the language switcher (I found the ‘language-switcher’ ID in the login page markup. The switcher code is in wp-login.php. I then found a simple filter (I love filters!) that I could use to disable it:

apply_filters( 'login_display_language_dropdown', true )

Returning ‘false’ will disable the language switcher. With the ‘__return_false‘ the plugin code will be one line!

I wrote the mini plugin before reading the make.wordpress.org article where it has the exact same line that I use. It was the most obvious solution.

The code

Related Posts

New text when an item is removed from the cart

Change hardcoded WooCommerce strings

Use a PO and MO file to change some hardcoded WooCommerce strings. The same concept works for other plugins and themes.

Demystifying Hooks, Actions & Filters – A quick run through

Hook and actions are the means to expand WordPress. They are *everywhere* but they are *not* scary. I promise.

How to internationalize your code

A demo on how to internationalize, localize (and test) your WordPress code.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Blog Categories

  • Being Green
  • Food
  • Grammar
  • Just Strange
  • Laziness
  • Personal
  • Portfolio
  • Race Reports
  • Shudder
  • Typo
  • Website Development
  • WooCommerce Tips
  • Facebook
  • Twitter

Copyright © 2013–2023 Damien Carbery · Using Genesis Framework · Privacy Policy