Hi,
I am discovering the beauty of the injection of template beyond the basics.
I checked the Bricks’s Hook and I couldn’t find something that works for me.
I would like, inside the main tag, to insert a section at the end.
I saw this thread but there is not what I am looking for.
Have you an idea ? Maybe I am missing something.
Thank you
You should use the bricks/content/html_before_end
filter to insert a section template. I just tried it on a testing website, and this seems to work fine:
add_filter( 'bricks/content/html_before_end', 'add_before_closing_main', 1 );
function add_before_closing_main( $content ) {
return $content . do_shortcode('[bricks_template id="286"]');
}
Do note that this is a filter, and not an action/hook (like bricks_before_header
or bricks_after_header
).
1 Like
Thank you, I’ll try that !