Last active
July 6, 2022 15:42
-
-
Save tdrayson/ea9111c82937d08e50febcb4abdc3345 to your computer and use it in GitHub Desktop.
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 | |
//Add to Advanced Scripts | |
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>'; | |
} | |
//Add Shortcode wrapper inside repeater div element | |
[repeater_post_class] | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment