Title: Wrap class &quot;listing-item&quot;
Last modified: August 22, 2016

---

# Wrap class "listing-item"

 *  Resolved [jfarr07](https://wordpress.org/support/users/jfarr07/)
 * (@jfarr07)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/wrap-class-listing-item/)
 * How do I wrap the class”listing-item” with another div so I can have better flexibility
   for my responsiveness?
 * [https://wordpress.org/plugins/display-posts-shortcode/](https://wordpress.org/plugins/display-posts-shortcode/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/wrap-class-listing-item/#post-5182038)
 * You will need to use the ‘display_posts_shortcode_output’ filter to modify what
   is output for each item. See this line in the plugin: [https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L288](https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L288)
 *  Thread Starter [jfarr07](https://wordpress.org/support/users/jfarr07/)
 * (@jfarr07)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/wrap-class-listing-item/#post-5182042)
 * Thanks Bill! I will look at doing this.. What I entered currently in my functions.
   php was this… but I’m not the greatest with PHP so I’m not sure if its fully 
   correct code wise but it does seem to work.
 *     ```
       add_filter( 'display_posts_shortcode_output', 'format_dps_outer', 10, 7 );
       function format_dps_outer( $output, $atts, $image, $title, $date, $excerpt, $inner_wrapper, $wrapper) {
   
       	// Make Outer Wrapper
       	$wrapper = ' <div>'. $wrapper .'<div>';
   
       	// Now let's rebuild the output.
       	$output = '<div class="customportfolio">' . '<' . $inner_wrapper . ' class="listing-item">' . $image . $title . $date . $excerpt . '</' . $inner_wrapper . '>' . '</div>';
   
       	// Finally we'll return the modified output
       	return $output;
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wrap class "listing-item"’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

## Tags

 * [wrap](https://wordpress.org/support/topic-tag/wrap/)

 * 2 replies
 * 2 participants
 * Last reply from: [jfarr07](https://wordpress.org/support/users/jfarr07/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/wrap-class-listing-item/#post-5182042)
 * Status: resolved