Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created December 16, 2016 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/0114db9559050824fb1f4af219cbc5df to your computer and use it in GitHub Desktop.
Save billerickson/0114db9559050824fb1f4af219cbc5df to your computer and use it in GitHub Desktop.
<?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