Skip to content

Instantly share code, notes, and snippets.

@billerickson billerickson/functions.php Secret
Created Dec 16, 2016

Embed
What would you like to do?
<?php // dont include this line
/**
* Reorder items in Display Posts Shortcode
*
*/
function ea_reorder_dps( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {
$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $image . $date . $title . $excerpt . $content . '</' . $inner_wrapper . '>';
return $output;
}
add_filter( 'display_posts_shortcode_output', 'ea_reorder_dps', 10, 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.