Archived topic
Recommended masonry layout for pages read more
9 replies · Started by Charles on October 16, 2017
Hi,
I would like to create a masonry layout for the home page of my site using read more from various page content. Before I start, I thought it best to ask for your recommendation, so I do it in the most compatible way for GeneratePress. I see you have built in configuration for a blog masonry layout but this content is already in pages.
Do you recommend masonry.js or another method?
Thanks
Charles
Masonry.js is definitely the way to go. It's packaged with WordPress too, so you just have the enqueue it.
Our Blog add-on has a masonry option as well which uses masonry.js.
Let me know if you need more info :)
Thanks Tom.
If I enable the blog columns will that enqueue masonry, or should I add the enqueue code to my child theme's function.php file?
If I do use the blog enqueue how can I enable it in pages?
Charles
Enabling the blog columns will enqueue it for you.
Enable the GP blog masonry options on pages? What would the masonry items show?
It's just for the home page. I want it to hold excerpts of the different sections on the site - but the excerpts are from pages, not posts. Currently the site is setup like that. This is what the site looks like now. http://southeglinton.ca/
This is what the redesign looks like:
http://southeglinton.ca/redesign.jpg
Thanks
Charles
The boxes themselves look pretty similar to that redesign?
Either way, it would likely need a custom masonry setup, as the elements aren't from GP, which the built in masonry depends on.
Yes, the boxes look close to what I want - it's too bad you only have this feature for posts and not pages. Maybe you could add that as a new setting in Premium in the future.
I presume there's no way I can repurpose your code for this for pages.
Charles
The GP code simply works off of jQuery masonry and sets the container and elements.
You would do the same for your container/elements.
Will do. Thanks Tom!
Charles
No problem :)