Title: Feature Request: Custom class for posts shortcode
Last modified: August 4, 2021

---

# Feature Request: Custom class for posts shortcode

 *  Resolved [Justa Mia](https://wordpress.org/support/users/y2kpeanut17/)
 * (@y2kpeanut17)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/feature-request-custom-class-for-posts-shortcode/)
 * I’ve been digging into the posts shortcode and I’m really impressed with the 
   potential, thanks to the custom templates feature. It’s like Bill Erickson’s ‘
   display posts’ plugin but more user-friendly.
 * But I have one simple request:
    **Please give us the option to add a custom class
   to the wrapper for the posts**.
 * **Why it’s needed?**
    Say you create a custom template for the loop. A basic 
   card layout. And you want to reuse the same template/card in different size grids.
   Currently you have to create a custom template for each. For example, I’d need
   a different template for a 2-wide and 3-wide grid.
 * But if we can add a wrapper class to the shortcode (like you can with all the
   other shortcodes) then we can just change the layout with a couple lines of CSS.
 * e.g.
 * .my-custom-loop.two-wide {
    grid-template-columns: 1fr 1fr; }
 * .my-custom-loop.three-wide {
    grid-template-columns: 1fr 1fr 1fr; }

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

 *  Thread Starter [Justa Mia](https://wordpress.org/support/users/y2kpeanut17/)
 * (@y2kpeanut17)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/feature-request-custom-class-for-posts-shortcode/#post-15059776)
 * This was marked resolved, but there was no response and the feature hasn’t been
   added.
 * It would be such a useful addition, allowing us to create multiple different 
   layouts from the same template. And it seems like an easy add. I’d love to hear
   back if you get the chance.
 *  Thread Starter [Justa Mia](https://wordpress.org/support/users/y2kpeanut17/)
 * (@y2kpeanut17)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/feature-request-custom-class-for-posts-shortcode/#post-15308748)
 * I saw you added this feature in the most recent update.
 * Thank you!

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

The topic ‘Feature Request: Custom class for posts shortcode’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [Justa Mia](https://wordpress.org/support/users/y2kpeanut17/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/feature-request-custom-class-for-posts-shortcode/#post-15308748)
 * Status: resolved