Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1362320

    Hello,

    My question is, is it possible to force masonry to show all sorting options?
    Currently it only shows categories that are loaded on the first page, but what about all those that are still hidden on next pages, how would people find these without knowing that you need to load more manually?

    Thank you for your time,

    Yves

    #1362351

    Hey ScenesBySevy,
    Thanks for your question, when the number of items are limited the sort option will only show from the items currently shown.
    Perhaps give this a try, in your masonry element select Display all entries and Pagination ▸ Post Number ▸ All with sorting enabled.
    Then add this css to your Quick CSS:

    #av-masonry-1 .av-masonry-container:not([id*="masonry_id_"]) .av-masonry-entry:nth-child(n+6) {
         display: none;
     }

    If you are using a masonry element on multiple pages and want to limit this behavior to one page then add a page ID to the css rule.
    Now on page load only 4 items will show, because all other items are hidden:
    2022-08-21_006.jpg
    but if any sort options are clicked all items for that sort will show, because the above css to hide items will be disabled:
    2022-08-21_007.jpg
    I linked to my example page below, and in my example, I only have 8 items.

    Best regards,
    Mike

    #1362367

    Hi Mike,
    Thank you for your quick response.
    This seems to do the trick.

    However, wouldn’t this harm page loading if there are more than 300 posts on the site and they are all loading in the background?
    I’m not sure how WordPress native sorting works, server side or something else.
    I’m afraid that page loading will eventually increase the more i post.

    #1362368

    Hi,
    Glad this helped, if you have 300+ posts your page would still load all of them.
    So for best results use the “load more” option and draw attention to the button so your visitors will know to use it.
    In order for 300+ posts to be sorted all of them will need to be loaded, either on page load or later when the user clicks “load more”.

    Best regards,
    Mike

    #1362370

    Thanks Mike!

    #1362393

    Hi,

    We are happy that Mike could help you! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/

    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘[Question] Masonry sorting does not show all categories’ is closed to new replies.