(23 tutorials)
Checking if the current post has been published within the last x days

Checking if the current post has been published within the last x days

Looking to conditionally output an element if the current post (either in a query loop or when viewing a single post) has been published in…
Categories:
Redirecting Paginated Pages in WordPress

Redirecting Paginated Pages in WordPress

It is typical to have one or more custom query loops on a static Page like the site's homepage. Let's say in one of these…
Categories:
Pro
How to Update Custom Fields with Default Values For Existing Posts when using ACF

How to Update Custom Fields with Default Values For Existing Posts when using ACF

Let's take a scenario where there are 10 Pages in a WordPress site. You proceed to create a Text-type of custom field called, say, "Custom…
Categories:
Tags:
Pro
Adding CSS based on a PHP boolean value in WordPress

Adding CSS based on a PHP boolean value in WordPress

In the Bricks Facebook group a user asked: How do I display a pseudo element depending on the presence of data in an ACF field…
Pro
Post Category Links Ordered by Parent and Child Categories in Bricks

Post Category Links Ordered by Parent and Child Categories in Bricks

A user asks: As far as know, there is built-in setting or a filter in Bricks builder to output comma-separated post categories with parent categories…
Adding code before closing head tag  in WordPress

Adding code before closing head tag in WordPress

Looking to add code before the closing head tag in a WordPress site? Most well-coded themes will have a call to wp_head() function before </head>…
Categories:
Pro
Custom Field Values Below Images in WordPress Block Editor Output

Custom Field Values Below Images in WordPress Block Editor Output

Updated on 7 Feb 2024 A user in our Facebook group asks: How can I display Image custom fields? I have 2 ACF fields for…
Categories:
Pro
Events Grouped by Event Year

Events Grouped by Event Year

In this Pro tutorial, we share the PHP code for outputting past events grouped by the event year in descending order of the event year.…
Categories:
Tags:
Pro
Fixed Publish Metabox on ACF Options Admin Page

Fixed Publish Metabox on ACF Options Admin Page

A small quality of life improvement that is useful when there's a long ACF Options (needs ACF Pro) admin page in the WordPress dashboard: Make…
Categories:
Is WooCommerce Cart Empty Condition in Bricks

Is WooCommerce Cart Empty Condition in Bricks

Looking to conditionally render an element depending on whether the user's cart is empty or not when using WooCommerce? and use it with a Dynamic…
Pro
Condition to Check if the Current Category Has At Least One Child

Condition to Check if the Current Category Has At Least One Child

Looking to render an element in the category archive Bricks template only if the category of the current category archive page is a parent? This…
Categories:
Pro
Checking for Grandparent Ancestor in WordPress

Checking for Grandparent Ancestor in WordPress

Consider this Page structure: Page 1|_ Page 1.1|__ Page 1.1.1 View in question: A single Page The requirement is to conditionally output an element only…
Author Page Archive Link for the Current User

Author Page Archive Link for the Current User

WordPress has a handy function called get_author_posts_url() that returns the URL of the archive page for the author of the current post. If you are…
Get Post ID from Post Title in WordPress

Get Post ID from Post Title in WordPress

Updated on 18 May 2023 Looking for a way to get a Post ID given its title on single posts in WordPress? The function is…
Categories:
Tags:
Pro
Redirecting Based on User ID(s) in Post Meta

Redirecting Based on User ID(s) in Post Meta

This Pro tutorial provides the steps to redirect single post pages to a specific URL/location like the site's homepage if the user viewing the page…
Removing Action/Filter Inside a Plugin’s Namespaced Class Constructor

Removing Action/Filter Inside a Plugin’s Namespaced Class Constructor

Recently worked with a friend figuring out how to remove/undo/cancel an add_action() line that's inside a plugin's constructor inside a PHP Class with the file…
Categories:
Tags:
Floats in Bricks for Wrapping Text Around Images

Floats in Bricks for Wrapping Text Around Images

In the Bricks Facebook group a user asks: Float, left or right? Just a quick question. Am I going crazy or can't I specify a…
Categories:
Tags:
Pro
Custom Meta Box Thumbnail Slider in WordPress

Custom Meta Box Thumbnail Slider in WordPress

This Pro tutorial provides the steps to set up an image and YouTube video thumbnail slider in WordPress using Splide and Meta Box. The site…
Categories:
Tags:
Pro
Dynamic Accordion in WordPress using Meta Box and Alpine.js

Dynamic Accordion in WordPress using Meta Box and Alpine.js

This Pro tutorial provides the steps to implement an accordion using Alpine.js in WordPress that pulls the values of sub fields of a Meta Box…