[Resolved] How to add masonry for part of the page

Home Forums Support [Resolved] How to add masonry for part of the page

Home Forums Support How to add masonry for part of the page

  • This topic has 5 replies, 3 voices, and was last updated 6 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #547186
    Vlastimil

    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

    #547274
    Jamal

    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.

    #547361
    Vlastimil

    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.

    #547940
    Tom
    Lead Developer
    Lead Developer

    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..

    #548008
    Vlastimil

    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!

    #548577
    Tom
    Lead Developer
    Lead Developer

    That’s something I’d like to do in the future for the Blog module ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.