Support » Plugin: Display Posts Shortcode » Where is the "Further Customization" section?

  • Resolved slobizman


    I keep seeing references to see the “Further Customizations” sections to learn how to filter the output. However, I cannot find such a section anywhere. Can someone point me to it?

    Note: What I’m trying to do is get the title on it’s own line and wrap it in H2’s.

    Thanks. Brilliant plugin and it’s going to be a lifesaver.

Viewing 1 replies (of 1 total)
  • I never found the Further Customizations section, but using the filtering example, I figured out out to wrap the title in H2’s! For anyone that need this, add this filter to your functions.php:

    // Display Posts Shortcode plugin: add H2 to title
    add_filter( 'display_posts_shortcode_output', 'format_dps_title', 10, 7 );
    function format_dps_title( $output, $atts, $image, $title, $date, $excerpt, $inner_wrapper ) {
    	// Make Title and H2
    	$title = ' <h2>'. $title .'</h2>';
    	// Now let's rebuild the output.
    	$output = '<' . $inner_wrapper . ' class="listing-item">' . $image . $title . $date . $excerpt . '</' . $inner_wrapper . '>';
    	// Finally we'll return the modified output
    	return $output;

    Then, if you have an excerpt following that, you’ll see a dash at the beginning of it. To remove the dash, add this to your CSS:

    .display-posts-listing .excerpt-dash {
Viewing 1 replies (of 1 total)
  • The topic ‘Where is the "Further Customization" section?’ is closed to new replies.