Viewing 5 posts - 31 through 35 (of 35 total)
  • Author
    Posts
  • #1494664

    Hi Ismael,

    I’ve already had it in this way before too. But for both queries, the sorting is incorrect. The ACF date field posts are first, but then sorted in the wrong order (they should be ascending), and the other posts are correctly after that first query, but also sorted in the wrong order (they should be descending).

    It should be:
    • 31.1.26 Test (with ACF date)
    • 2.2.26 Test2 (with ACF date)
    • And after those the posts without ACF date sorted desc by publication date (in the example “Minispielkreis” should be the latest post in the list in the frontend)

    Can you change the order for each query and keep the queries in place like now (first ACF and the posts without afterwards)?

    All the best,
    Daniel

    #1494753

    Hi,

    It’s not possible to assign different query or orderby parameters to posts within a single loop. You may need to add a separate Masonry element for posts with the ACF field and another for posts without it, which will make it easier to adjust their sorting or order.

    Best regards,
    Ismael

    #1494760

    Hi Ismael,
    That’s not the answer I was hoping for. Too bad. If I use two Masonry elements, I no longer have the option of outputting and filtering them as a single unit. So that’s not a solution.

    But it should be possible to sort the posts with the ACF fields in ascending order first and then have all the other posts come after them, in whatever order. Until now, the ACF posts have always been at the end when they were sorted correctly. What I mean is:

    • 31.1.26 Test (with ACF date)
    • 2.2.26 Test2 (with ACF date)
    • And after those the posts without ACF date sorted in whatever reason

    You know what I mean?

    Kind regards,
    Daniel

    #1494780

    Hi,

    As mentioned earlier, it’s not possible to separate the queries within a single loop. Since this requires a custom modification, we recommend hiring a freelance developer or reaching out to a customization platform such as Codeable for further assistance.

    https://kriesi.at/contact/customization

    Best regards,
    Ismael

    #1494879

    So the query always has the posts with ACF in front, but the wrong way around, or in the very end?

Viewing 5 posts - 31 through 35 (of 35 total)
  • You must be logged in to reply to this topic.