Show Upcoming Events - P2 - Using Meta Box + Bricks | Meta Box Tutorial
ฝัง
- เผยแพร่เมื่อ 8 ก.ค. 2024
- Sharing what’s coming up helps us see important dates and deadlines, so we can manage events better. Take the upcoming events as an example. Let's use Meta Box and Bricks to make it happen!
Read more about it here: metabox.io/show-upcoming-even...
#tutorial #meta_box #WordPress #custom_fields #dynamic_data #upcoming_events #bricks
-----------
0:00 Intro
1:00 Before Getting Started
1:53 Step 1: Create a Custom Post Type
2:13 Step 2: Create Custom Fields
4:25 Step 3: Display All Events on the Page
9:27 Step 4: Query to Show the Upcoming Events - วิทยาศาสตร์และเทคโนโลยี
Nice tutorial, thank you Meta Box team
How to set only 1 nearest upcoming event in specifoc time if there arw some eventa in 1 day?
Hi, it's an interesting question.
Obviously, you need to add a DateTime Picker field (to enter the time of the event).
Then, in the Meta Query of the div, you should add some settings:
- Meta key as field ID of the start time
- Meta value as 'current_date:Y-m-d H:i'
- Compare: Greater than
And don't forget set Post per page as '1'
Can you try and tell us the result?
I saw Jetengine have something called CCT (Custom Content Type), is it the same as normal CPT in Metabox or else?
No, JetEngine has the Custom Post Type as well. And CCT is to save metadata to one table.