Flex grid – filtering custom post types by post metadata field

Posted in: Newspaper
Post count: 65

Hello!

I am working on a custom post type for events (i have some ACF field set for them that includes start date field). I’ve managed to create custom post type template and it works fine. On an individual event page I would like to display a flex grid (similar one like we have below the posts) that displays upcoming next four events and I want to make sure that old events are not shown.

I am able to display grid of four items but it will just show them based on latest publish time (which is fine for posts but not fine for events). Is it possible in Newspaper to filter the grid based on a field from post metadata? It would be a basic filter like: IF date >= now THEN include in display

If thats not possible using such condition can I use at all my custom metadata fields for a given custom post type in sorting/filtering in Newspaper grids? Just trying to find a creative way how to just show the events grid without including past ones. Maybe you have some idea based on your experience with CPT/ACF and Newspaper?

Post count: 27744

Hello,

The theme doesn’t have a filter like that, but you can try to filter by using the post id filter, and setting your custom field https://i.imgur.com/CtVg53Z.png It may work better.
The custom field needs to be the type text, not the date or data picker.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.