Tagged: Custom Post Type, masonry, order, sticky posts
-
AuthorPosts
-
February 4, 2026 at 10:23 am #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,
DanielFebruary 5, 2026 at 3:07 pm #1494753Hi,
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,
IsmaelFebruary 5, 2026 at 5:24 pm #1494760Hi 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 reasonYou know what I mean?
Kind regards,
DanielFebruary 6, 2026 at 5:31 am #1494780Hi,
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,
IsmaelFebruary 9, 2026 at 11:04 am #1494879So the query always has the posts with ACF in front, but the wrong way around, or in the very end?
-
AuthorPosts
- You must be logged in to reply to this topic.
