This Pro tutorial for Bricks users provides the steps for outputting elements depending on whether the value of the current post's custom field of Date Time Picker type created using ACF (might be updated with Meta Box-specific changes in the future) is before or after the current time whilst taking the site's timezone into account.
Let's take an example where "Event Date" for a post is November 20, 2023 5:30 pm. Now you want to output a Section (inside the loop for this post - could be the single post view or in a Bricks query loop) only if the current time is 5:30 pm on Nov 20, 2023 or past that but not before that. This tutorial shows how.
It's a way of saying "I want this thing to go live from this time on this day" with the time and date coming from the post's meta and so could be different from post to post. "Dynamic post meta element scheduling" could be an alternate title for this tutorial.
At Settings → General, select the city in the same timezone as you.
Create your custom field group.
Tip: If you are using
get_field() in your code anywhere for outputting DateTime field values with a few lines of code to take timezone into consideration, select
Y-m-d H:i:s as the Return format. It is not necessary for this tutorial.
Edit your items and populate the field for each.
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account