Viewing 1 replies (of 1 total)
  • Thread Starter slobizman

    (@slobizman)

    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 {
            display:none;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Where is the "Further Customization" section?’ is closed to new replies.