You can easily add custom attributes when you need them for your Beaver Themer layouts.
The code example below uses the
fl_render_content_by_id_attrs filter to add the attribute(s) to your Beaver Themer layout whose ID you have specified in the code. This example will add an attribute of
role with a value of
banner. This is useful for Header Layout Types.
The code example below uses an ID of
2168 this is the ID of your Beaver Themer layout. To get the ID, copy the post number from the URL in your browser’s address bar, as shown in this screenshot.
Substitute your own attribute name and value and your Themer layout ID in the code and place the code in the functions.php file of your child theme.
This example demonstrates how to use the filter to add multiple attributes to a Themer layout.