Skip to content

Instantly share code, notes, and snippets.

@davechu
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davechu/f5de7c9d3586a8ffb659 to your computer and use it in GitHub Desktop.
Save davechu/f5de7c9d3586a8ffb659 to your computer and use it in GitHub Desktop.
For Rogier. This would go in your functions.php. Be careful, this will replace all occurrences of that string. Otherwise, make a custom template. :)
add_filter( 'language_attributes', 'dc_change_html_lang' );
function dc_change_html_lang( $attributes ) {
if ( is_page(42) ) {
$attributes = str_replace("nl-NL", "en", $attributes );
}
return $attributes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment