Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active June 12, 2018 13:24
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/0f5b8a7562f8510bdcb5c45d1ad8bf2d to your computer and use it in GitHub Desktop.
Save billerickson/0f5b8a7562f8510bdcb5c45d1ad8bf2d to your computer and use it in GitHub Desktop.
<?php
/**
* DPS - Move date after content
* @see https://www.billerickson.net/code/using-display-posts-shortcode-output-filter
*
*/
function be_dps_move_date_after_content( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) {
$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $image . $title . $author . $category_display_text . $excerpt . $content . $date . '</' . $inner_wrapper . '>';
return $output;
}
add_filter( 'display_posts_shortcode_output', 'be_dps_move_date_after_content', 10, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment