• Resolved Justa Mia

    (@y2kpeanut17)


    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

    (@y2kpeanut17)

    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

    (@y2kpeanut17)

    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.