1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Hide the WordPress Language Switcher

How to Hide the WordPress Language Switcher

Introduction

WordPress 5.9+ displays a language-selection dropdown on the login screen. The BuddyBoss Theme/Platform does not include a built-in toggle to hide this switcher, so you’ll need to add a small snippet of custom code to remove it.

Add the Filter to Disable the Language Dropdown

  1. In your WordPress admin, go to Appearance > Theme Editor.
  2. Under Select theme to edit, choose your active child theme (e.g., BuddyBoss Child) and click Select.
  3. In the Theme Files list, click Theme Functions (functions.php).

Append the following line just before the closing ?> tag:

add_filter( 'login_display_language_dropdown', '__return_false' );

  1. Click Update File to save your changes.

Troubleshooting and FAQs

Q: The language switcher still appears—what did I miss?
A:

  • Ensure you edited the child theme’s functions.php, not the parent theme.
  • Clear any object- or page-cache and reload the login page.

Q: I can’t access the Theme Editor—what can I do
A:

  • Your host may disable file editing. Edit functions.php via FTP or your hosting control panel instead.
  • Alternatively, add the snippet to a site-specific plugin or a code-snippet manager.

Q: Will this affect other parts of my site?
A: No. This filter only targets the login screen’s language dropdown. Front-end language switchers (if provided by a plugin) remain unaffected.

Q: Can I re-enable the dropdown later?
A: Yes. Remove or comment out the add_filter( ‘login_display_language_dropdown’, ‘__return_false’ ); line and save the file.

Note: Any modifications are considered as custom work already. Know more about our Support Policy here: https://www.buddyboss.com/support-policy/

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Support

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.

Not recently active