Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Created December 29, 2017 21:16
Show Gist options
  • Save vielhuber/758904958aa559f62162df2e497fb856 to your computer and use it in GitHub Desktop.
Save vielhuber/758904958aa559f62162df2e497fb856 to your computer and use it in GitHub Desktop.
#wordpress polylang disable language in frontend
<?php
if( !is_admin() && $pagenow != 'wp-login.php' && pll_current_language() == 'en' )
{
wp_redirect(site_url().'/de/');
die();
}
@vielhuber
Copy link
Author

Try to debug what exactly is not working. Does the first/second if clause work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment