Action: bricks/archive_product/before
Action: bricks/archive_product/before
Section titled “Action: bricks/archive_product/before”Runs before the Bricks content is rendered on a WooCommerce product archive page when a Bricks template is used. This action is specific to WooCommerce archives rendered by Bricks.
Parameters
Section titled “Parameters”$bricks_data(array): The Bricks data for the template being rendered.$post_id(int): The ID of the post/archive being rendered.
Example usage
Section titled “Example usage”add_action( 'bricks/archive_product/before', function( $bricks_data, $post_id ) { // Output custom content before the product archive echo '<div class="custom-archive-header">Welcome to our shop</div>';} ); Was this page helpful?