Get 30% discount on lifetime membership by using BFCM2023 coupon.
Offer ends on 30th Nov 2023 at 11:59:59 PM UTC.

Posts Published Today in Bricks

In this Pro tutorial we are going to prefilter the posts using a date query to those published today and conditionally output the Bricks Section having the Posts element/Query Loop only if there is at least 1 published post today.

Additionally, we shall programmatically add "s" at the end of "Today's Article" if there is more than 1 post published today.

Add a Section having a Today's Article Heading and Posts element.

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to all 250+ Bricks code tutorials with BricksLabs Pro