Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 3, 2019 14:59
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/ef7a392654121251a1b16481d5190f1b to your computer and use it in GitHub Desktop.
Save billerickson/ef7a392654121251a1b16481d5190f1b to your computer and use it in GitHub Desktop.
<?php //don't include this line
/**
* Class on excerpt more
*
*/
function be_dps_excerpt_more_class( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) {
if( !empty( $excerpt ) )
$output = str_replace( $excerpt, '<span class="excerpt-more">' . $excerpt . '</span>', $output );
return $output;
}
add_filter( 'display_posts_shortcode_output', 'be_dps_excerpt_more_class', 10, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment