Skip to content

Instantly share code, notes, and snippets.

@ONEKENO
Forked from vielhuber/functions.php
Created July 22, 2019 07:01
Show Gist options
  • Save ONEKENO/a425cc9b70ea0d828e0563b53365d244 to your computer and use it in GitHub Desktop.
Save ONEKENO/a425cc9b70ea0d828e0563b53365d244 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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment