We are away from the office until 18th October, 24. Our support system is closed now.

Premium add-on for Bricks Builder

Add attributes to BODY tag

You can easily add your own custom attributes to <body> tag. There has a filter bricks/body/attributes. Open the functions.php file of the bricks child theme or any 3rd party snippets plugin and drop the following PHP code

add_filter('bricks/header/attributes','my_body_id');
function my_body_id( $attributes ) { 
	$attributes['id'] = "enter-your-id";
	$attributes['data-my-att'] = "enter-your-attribute-value";

	return $attributes;
}

Reference: https://forum.bricksbuilder.io/t/how-can-i-add-an-id-to-the-body-tag/11097

Fills In: 

Leave the first comment

Search Tutorials

Request TutorialsFeatures Request