<?php | |
//---------------------------------------------------------- | |
// Display Posts Shortcode plugin: add H2 to title | |
//---------------------------------------------------------- | |
add_filter( 'display_posts_shortcode_output', 'format_dps_title', 10, 9 ); | |
function format_dps_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) { | |
// Make Title and H2 | |
$title = ' <h3>'. $title .'</h3>'; | |
// Now let's rebuild the output. | |
$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $image . $title . $date . $author . $category_display_text . $excerpt . $content . '</' . $inner_wrapper . '>'; | |
// Finally we'll return the modified output | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment