Query for upcoming events not working like suggested

Hi there,

so I use Metabox and have setup Events, also with a custom field date picker. I want to query this and make an “upcoming events” sort of section.

Yes, I have already tried two different tutorials on this topic and searched this forum and tried their solutions. None of them have worked properly so far, I really hope to find a solution soon.

The site is: https://dev.wushu.de/
The aforementioned sections are toward the footer. One is the planned design, the “text-only” was a test to see if something else in the container was the issue (but wasn’t, still didn’t work). They seem to be displayed by “date published” rather than my chosen meta value.
Also, I have done this with several different “date” formats in the wordpress general settings.
The ID of the meta I’m trying to query is “datum” in Metabox.

Method one:


As you can see, I’m querying seminars & events and have setup a meta query as suggested in a tutorial by @Sridhar
This hasn’t worked so far. I have tried “Type” as “Char” or “Numeric”.

Method two:
Was this tutorial: Query events using a start and end date created with MetaBox and queried using Bricks Builder - YouTube
Had the snippet, saved the custom field as timestamp and so on, with no correct result.

What am I doing wrong here? Any help is appreciated.

Other Plugins used/activated: ACSS, Bricksextras, metabox, frames, fluent forms, snippets.

Hi

what Bricks version are you using?

because I see in your site also the scrolling bug for sticky headers:

Cheers

Patric

Hi there,

I have just updated Bricks to 1.7 from 1.6.1. I had updated all other plugins a couple of days ago.
Unfortunately, the issue is still present. I’m not quite sure what issue with the header, but that’s another topic.

Just to be sure, I have just tried to make a new section with a query loop and @Sridhar 's method doesn’t seem to work. The tutorial is rather simple, I’m desparate to know why this won’t work on my site…

Hi

at least one good news…

now the problem with the sticky header is gone.

I am not using Meta so unfortunately I can’t help you with that one, sorry.

Cheers

Patric

1 Like

Thanks for your input! I hadn’t even noticed the issue with the header.

Nonetheless, I really hope somebody has an idea or maybe @timmse? I know you helped with a similiar issue with ACF, setting the meta to “Numeric”, but this didn’t help with Metabox.

Hi @pasayin
I had this issue and found I needed to set up the query as:

Then the meta query was set up as:

I have tried as you said: The events are now showing in chronological order, but previous events (prior to current date) are still showing.
Also, this only works when i DONT set the type to Datetime but leave as default. If I do set it to datetime, then the query breaks and nothing will load.

Try DATE instead of DATETIME

Meta query only works and shows content if type is set to default, CHAR. Wierd, isn’t it?

Tried this with data from Modern Events Calendar and can’t get it working. Not sure what the deal is. I tried DATETIME, TIME, DATE.

When i set the query to order by Meta Value and put the custom field from MEC ‘cf_mec_start_date’, my loop immediately disappears.

I completed the rest of the Meta Query settings too, and still nothing populates in the loop.