Site logo

Archived topic

How to add masonry for part of the page

5 replies · Started by Vlastimil on April 11, 2018

Viewing posts 1–6 of 6

Hi,

the page layout should be:

* articles in a short view (title, date), max. 10
* articles in masonry + paging

I was looking for some howto, didn't find anything. I know that the wrapper is .masonry-container but there's a class for body tag (masonry-enabled) which makes masonry from the first part of the page as well. I only need masonry on the second part. How to deal with that?

thanks

Hi

I would usually take the easiest solution and make use of Tom's WP Show Posts to make the masonry articles. You can use the above plugin to show both lists of articles inside GP sections.

Play with it and ask if you get stuck.

Hi, Jamal, thank you for your tip.

We've already bought GP Premium (because of masonry) and are very happy with it. So another plugin shouldn't be needed. And we have some special arguments for WP_Query on this place.

I'm developer and I'm able to adapt the code for this purpose. But I need some hint where and how to start.

So thank you but this is not a solution I'm looking for.

Using the built in masonry system would require you to use one of the built in archive templates. Unfortunately it's not meant to work on pages or custom page templates.

However, there's nothing stopping you from downloading and enqueuing masonry yourself: https://masonry.desandro.com/

Then you can initiate the script with your custom HTML markup etc..

Hi Tom,

thank you for your answer. That's what I needed - although it'd better to hear that it works with custom templates :-)

Anyway, thanks!

That's something I'd like to do in the future for the Blog module :)

This archived topic is closed to new replies.