Discover in this tutorial how to limit the languages displayed on the WordPress login page using code.
WordPress 5.9 introduces quite a few new features, including adding a new language switcher (which will show the languages installed on that WordPress) on the login page.
But you may not want all the installed languages to be displayed, but only the ones you are interested in.
In this tutorial you will learn how to achieve this.
Snippet to limit the number of languages displayed in the WordPress login page selector
Add the following code at the end of functions.php or in your functionality plugin:
In this code you use the
login_language_dropdown_args filter to indicate that only the Spanish (es_ES) and English (en_EN) languages should be displayed.
You can add or remove as many languages as you want within the array.
Do you prefer to hide them all? Then take a look at this other tutorial.
Now you know how to control the languages displayed in the login page selector that was added in WordPress 5.9.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉