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

Instant access to 390+ Bricks code tutorials with BricksLabs Pro

Leave the first comment