Last active
August 29, 2015 14:23
-
-
Save rianrietveld/1a4e027e3dd8b53aded8 to your computer and use it in GitHub Desktop.
Template file language switcher on entry-content only (Genesis)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: English page | |
* Adds lang=en to the entry-content div only | |
* | |
* @package Genesis\Templates | |
* @author Rian Rietveld | |
* @license GPL-2.0+ | |
*/ | |
add_filter( 'genesis_attr_entry-content', 'oogv_lang_attr_content' ); | |
genesis(); | |
function oogv_lang_attr_content($attributes) { | |
$attributes['lang'] = 'en'; | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment