Help with displaying only future events (CTP) using ACF and Flex Block Builder

Posted in: Newspaper
Post count: 63

Hello Support Team,

I am creating an event calendar using Advanced Custom Fields (ACF) to store event information, including the event date and location. I want to achieve the following:

Display only future events, starting from the current date (including events happening today).
Sort events by the event date (stored in an ACF field) rather than the post creation date in the CMS.
The event date is stored in an ACF date_time_picker field named data_i_godzina_wydarzenia.
The event location is stored in an ACF text field named miejsce_wydarzenia.
I am using Flex Block Builder to display the posts from my custom post type (CPT). Could you please guide me on how to modify the query or settings so that my event list displays only future events, filtering out past ones and sorting them by the event date?

Thank you very much for your help!

Best regards,
Jakub

  • This topic was modified 1 year by kubick.
Post count: 35449

Hi Jakub,
So you’ll need to create modules (you can add the element you’ll like on your block, like title, image, date, custom fields for ACF ….) that will display the data you wont for your CTP to be display on Flex Block Builderhttps://i.imgur.com/FXiIsYA.pnghttps://i.imgur.com/a8TkqlA.pnghttps://i.imgur.com/TujQWUA.png
I hope this will help you!
Thank you!

Post count: 63

Thank you for your reply, but I would like to clarify my question. My main issue is sorting the post with events by the start date, which is stored in an ACF field called “data_i_godzina_wydarzenia”. I would like to display only future events (those that haven’t occurred yet) and sort them by this field, not by the post creation date.

To give You a better idea, here’s a video that explains how to do it in Elementor: https://youtu.be/w-95BrIJyQA. However, I’m using Flex Block Builder i TagDiv Composer, so I would need similar guidance for that.

Could you please help me with adjusting the query or settings to achieve this?

Thank you for your assistance!

Post count: 27744

Hello,

To have this type of filter needs to be done some custom modification, and this can be done only with custom work.

Thank you!

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