Conditions still not working for me

I created a post about this previously and my last reply said that I would experiment to see if I could find a solution, although the topic is now closed. All my attempts have failed.

I am trying to hide and show content using date and time conditions, although it has not worked as intended on many different blog posts. I have experimented with conditions including both date and time, and also with separate conditions for date and time.

The content is hidden or shown correctly, depending on what I am trying to achieve when both the before and after variables are used, but the content never changes state at the given time. My current attempt is combining date and time conditions on a row:

Using the following:

{{dc:global:date format=“F j, Y g:i a”}}
January 11, 2022 10:00 am

The current post with two rows set to appear and one row set to disappear is https://guitartheoryandtechniquebook.com/alternate-picking-guitar/.

Anything obvious, or do you need me to create a secure note with login details?

I use WP Rocket, so I have thought it could be a cache issue, but I do not know what to change if this is the issue.

Thanks!

Hello Paul,

Thanks for writing in! To better assist you with your issue, kindly provide us access to your site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Cheers.

Thanks Rue. I will attach a secure note to this reply.

Hey Paul,

The Date Condition works (see video in the secure note). When setting up conditions using Dynamic Content, it would help if you temporarily put the Global Date Dynamic Content {{dc:global:date format="F j, Y g:i a"}} in a Text element for reference.

In the video, you’ll see that the correct conditon Global Date January 11, 2022 3:57 pm AFTER January 11, 2022 10:00 am is working. 3:57 PM is after 10 AM on the same day.

Please review your setup and if I’m mistaken please provide details and screenshots of the Rows your working on and the Conditions set.

Thanks.

Thanks Christian. I will continue to experiment although when previewing in the builder, the conditions have been working for me too. It is when a date and time arrives that one row should appear and one row should disappear, although it doesn’t.

I have a row set to appear tomorrow morning (row 3):

!

And the “coming soon” section should disappear. All seems good in my tests, but things do not seem to work at the time. I will study your video and see if I can figure out the problem. Could it be a cache issue my end in that it does work, but I am not seeing the changes? I have tried private windows.

Thanks

Hey Paul,

Yes, aggressive caching could be the culprit. If your content is changing like when you have conditions or content that is changing in general, you should exclude the page from being cached.

Just as an aside, this is the reason why e-commerce sites are generally not cached because content or parts of the site are continuously changing.

Try deactivating your caching plugin or contact your web host to clear all caches then monitor the result.

Thanks.

Thanks Christian. I will experiment with caching and see if I can come up with a solution.

Hello Paul,

Please let us know how it goes.

Thanks

Will do! Thanks for the help.

You are most welcome Paul.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.