15th Nov '23
/
0 comments

Useful Action Hooks in Bricks

Updated on 29 Nov 2023

Bricks has a few handy action hooks that can be used to inject/add code in various areas of your websites.

Here are a few commonly-used ones.

bricks_meta_tags

To add code as high in the head as possible.

Screenshot from WPCodeBox:

To add code before closing head tag.

bricks_body

To add code after the opening body tag.

bricks_before_site_wrapper

To add before the site wrapper. This one is above bricks_before_header and is redundant for practical purposes.

bricks_before_header

To add before or above the header.

Same screenshot as above.

bricks_after_header

To add after or below the header.

bricks_before_footer

To add before the footer.

bricks_after_footer

To add after the footer.

bricks_after_site_wrapper

To add after the site wrapper. This hook is below or after the bricks_after_footer hook.

Generally speaking, this is redundant or not necessary.

Same screenshot as above.

To add code before the closing body tag.

References

/wp-content/themes/bricks/header.php

/wp-content/themes/bricks/footer.php

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Leave the first comment

 

Related Tutorials..

How to wrap main element in custom divs in Bricks

How to wrap main element in custom divs in Bricks

Looking to wrap the main element that is between header and footer with some custom div(s)? Bricks provides ample hooks throughout its codebase. Add this…
Categories:
Tags:
Floating Element in Bricks

Floating Element in Bricks

How to create a floating element in Bricks that appears across the entire website.
Categories:
Tags:
Pro
Fixed Sidebar Layout in Bricks

Fixed Sidebar Layout in Bricks

A user asked: This Pro tutorial provides the steps to set up a fixed left (or can be on the right) sidebar using hooks and…
Categories: