Set a Bricks Builder Template using PHP
March 24, 2023
This article will show you how to set a Bricks Builder Template for a post or page using PHP. The way we'll do it is by utilizing the bricks/screen_conditions/scores PHP Filter. You'll notice that the last word on the end of that filter is "scores". Bricks has a built-in template scoring system and it uses…
Read MoreRedirect WordPress Dashboard to a custom URL for Admins
March 22, 2023
Here is the PHP code I use to redirect to a custom WordPress Admin Page when I log into WordPress as an Administrator. Add this in functions.php or wherever else you add PHP code snippets (using WPCodeBox etc). But the above PHP code isn't going to be very useful if you don't know how to…
Read MoreAdd offset to Smooth Scroll in Bricks (for Anchor Links)
March 19, 2023
Below is the CSS code you can copy and paste into your website to add an offset to the Smooth Scroll feature in Bricks. The code is as follows: This code is taken from my own website and I added it so that my Sticky Header didn't hide headings when I clicked to go to…
Read MoreHide Bricks Elements using has_blocks()
March 19, 2023
Using the has_blocks() function inside of Bricks allows you to control the output of elements based on whether or not you're using Gutenberg or Bricks for the content of your Post / Page. Like most of my tutorials, we're going to go through a real-world scenario to best explain how (and why) you might want…
Read MoreBricks and Gutenberg content in the SAME Template
March 18, 2023
This article shows you how to create a Single Post template in Bricks Builder that allows you to use Gutenberg AND Bricks Builder to create your content area. Here's what we'll set up in the article and why you might want to do it in your website. We will create a new Single Post template…
Read MoreBricks Builder: Conditions based on Post Type
March 8, 2023
To show and hide elements in Bricks Builder based on Post Type conditions, you need to combine the native WordPress get_post_type() function with the Bricks Builder "echo" feature available in the Conditional Logic builder. Did that scare you? Don't worry! It's actually extremely easy to do! I'll also give you the exact PHP code you…
Read MoreHow to use BEM in Bricks Builder (with Examples)
March 7, 2023
In this post, I detail all the tips and tricks I've learnt while integrating the BEM methodology into the websites I build using Bricks Builder so that you can learn from my mistakes. I will add to this article as I learn more about how it works and some of the best ways I've found…
Read MoreBricks Builder: Show/Hide elements based on Business Opening Hours
February 2, 2023
Here is how you can Show and Hide elements on the Page based on whether or not your Business is currently OPEN or CLOSED. The more robust solution For a more thorough solution, I put together this video below where I go through coding this. The video is below and you can grab all the…
Read MoreBricks Builder: Display “You Save x%” in the Shop Loop | WooCommerce
February 1, 2023
Here's how to show a "you save X% in" in the WooCommerce shop loop when using Bricks Builder. VIDEO: The Video Tutorial Here is my YouTube video that shows you how to set this up. The PHP code And here is the code that we go through in the video.
Read MoreTable of Contents to Bricks Builder 2023 – Copy & Paste THIS code
July 28, 2022
I wanted a way to add a Table of Contents to WordPress that made the usability of the website much better. Easy right? Well, I couldn't find it in the plugin and so I went searching and decided on the below code. This Code I pieced together this Table of Contents from a few different…
Read More