-
-
Save nikcree/9ee6a2d66ebad75926ae to your computer and use it in GitHub Desktop.
This file contains 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
add_filter( 'genesis_attr_content', 'custom_attributes_content' ); | |
/** | |
* Add the class needed for FacetWP to main element. | |
* | |
* Context: Posts page, all Archives and Search results page. | |
* | |
* @author Sridhar Katakam | |
* @link http://sridharkatakam.com/facetwp-genesis/ | |
*/ | |
function custom_attributes_content( $attributes ) { | |
if ( is_home() || is_archive() || is_search() ) { | |
$attributes['class'] .= ' facetwp-template'; | |
} | |
return $attributes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment