Created
October 20, 2019 01:10
-
-
Save wplit/6430643213641e45e9e2c0ffea881c43 to your computer and use it in GitHub Desktop.
Shortcode for adding post classes inside Oxygen Repeater
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_shortcode( 'repeater_post_class', 'lit_post_class_sc' ); | |
/** | |
* Shortcode for adding post classes inside Oxygen Repeater | |
*/ | |
function lit_post_class_sc( $atts, $content = null ) { | |
$postclasses = join( ' ', get_post_class() ); | |
return '<div class="'. $postclasses . '" />' . $content . '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment