Title: Variable width masonry items
Last modified: September 5, 2021

---

# Variable width masonry items

 *  [originalpiratematerial](https://wordpress.org/support/users/originalpiratematerial/)
 * (@originalpiratematerial)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-width-masonry-items/)
 * Is it possible to make the items in a masonry layout variable width like on [https://masonry.desandro.com/layout.html](https://masonry.desandro.com/layout.html)?
 * I’d want to be able to inject an ACF class into the item div to determine how
   many columns it should take up

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

 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-width-masonry-items/#post-14841967)
 * Hey [@originalpiratematerial](https://wordpress.org/support/users/originalpiratematerial/)
 * We’re actually looking at dropping that masonry script and replacing it with 
   a pure CSS based approach instead (CSS Grid, probably)…
 * Re the wider items, I’ve wanted to do something like that for a while, just need
   to make the switch and then figure out how how we can do that with CSS grid.
 * It’s not going to be a quick addition (there is a lot of work to be done in the
   next major update, first) and then we’ll surely get to this.
 * Actually I do have one idea: to add a WP hook (for layouts) so that you can add
   a custom class to certain elements (the ones that need the extra `width` class).
 * I’m not 100% on it, but its something I might be able to drop in quite easily(
   need to double check on that)… do you think that would give you the flexibility
   you need to implement the above?
 * Best
    – Ross
    -  This reply was modified 4 years, 9 months ago by [Code Amp](https://wordpress.org/support/users/codeamp/).
 *  Thread Starter [originalpiratematerial](https://wordpress.org/support/users/originalpiratematerial/)
 * (@originalpiratematerial)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-width-masonry-items/#post-14842058)
 * Thanks for the detailed feedback! If the hook could pull through an ACF field
   per item that could work.
 * Based on the existing UI I’d love to be able to reference a single or multi value
   ACF field (or a core taxonomy) in Post template > Advanced > Additional CSS classes
 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/variable-width-masonry-items/#post-15047954)
 * Hey [@originalpiratematerial](https://wordpress.org/support/users/originalpiratematerial/)
 * Apologies for the super late reply to this.
 * Every time I’m about to add this I hesitate and end up not adding the feature.
 * The thing is, we’re going to be changing a lot of the underlying code, so I can’t
   guarantee in the next major update, this won’t be removed… which leads me to 
   think it’s not a smart choice to add it in right now.
 * I’d rather wait until we’ve restructure the plugin a little, and then add this
   feature in properly if that’s possible with the new architecture.
 * Sorry my update is not more positive right now, hopefully we can some traction
   on this a little further down the line.
 * Best

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

The topic ‘Variable width masonry items’ is closed to new replies.

 * ![](https://ps.w.org/custom-layouts/assets/icon-256x256.png?rev=2475457)
 * [Custom Layouts - Post + Product grids made easy](https://wordpress.org/plugins/custom-layouts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-layouts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-layouts/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-layouts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-layouts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-layouts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Code Amp](https://wordpress.org/support/users/codeamp/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/variable-width-masonry-items/#post-15047954)
 * Status: not a support question