Display content in only one language of your WordPress Multi-site installation

With this simple function (which you should place in your theme's functions.php file), you can create a simple snippet of code that you can use to hide or show certain parts of your content to the visitor.

The function below will in this case return the Danish version of your WordPress website.

function get_only_dk_site_lennartc() {
	$thislang = ((get_locale() == 'da_DK'));
	return $thislang;
}

Using this feature, you can create adaptive WordPress themes based on the language.