Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active January 4, 2019 05:28
Show Gist options
  • Save billerickson/7bad8060ee72f0d4ecd1ce01b508be29 to your computer and use it in GitHub Desktop.
Save billerickson/7bad8060ee72f0d4ecd1ce01b508be29 to your computer and use it in GitHub Desktop.
<?php
/**
* Display Posts Output Filter
* @see https://displayposts.com/docs/the-output-filter/
*
*/
function be_dps_output_customization( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) {
$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $image . $title . $date . $author . $category_display_text . $excerpt . $content . '</' . $inner_wrapper . '>';
return $output;
}
add_filter( 'display_posts_shortcode_output', 'be_dps_output_customization', 10, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment