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.


what Bricks version are you using?

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



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…


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.



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.

same situation,

have you since found a solution ?

For @daviddemastus and for @Heave

For MEC, Modern Event Calendar, it works with theses settings :

In the loop,

  • search for Events
  • order by Meta Value
  • key : mec_start_date
  • order : like u want

Meta query :

  • Meta key : mec_start_date
  • Meta value : {current_date:Y-m-d}
  • Compare : Greater than or equal
  • Type : DATETIME


1 Like

Hi, I am trying to show ME Calendar events, and it works when done as explained by Sebastien, thanks for that :slightly_smiling_face: but only with the main date entered. I have many repeating event dates entered and those are not checked. The first time the event occurred is checked and works fine, but even though it is active, it is not shown. How to query the repeating dates, they do not even seem to be in the same table. Help would be very appreciated. Thanks!

So I’ve gotten the future events in a CPT to display correctly, but I also want to display the last event from the CPT (it’s a sports website where I want to show a recap of the last event next to the preview of the next event if that makes sense.)

In my Meta Query, it makes sense to me to have the same Meta Key and Meta Value as the future event but then select lesser or lesser or equal. But when I select that the first event in the CPT (from several months ago) displays instead of the most recent event. I tried changing the ascending vs. descending order without any luck. Any ideas?