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;
}
- The topic ‘Feature Request: Custom class for posts shortcode’ is closed to new replies.