If you’re experiencing issues with custom layout rendering incorrectly in Beaver Builder when using the Astra theme?
Adding the below provided filter to your child theme’s functions.php file might indeed resolve the problem.
add_filter( 'astra_addon_bb_render_content_by_id', '__return_true' );
Here’s a breakdown of what this filter does and how it might help:
Sometimes, Beaver Builder might not render custom layouts correctly due to conflicts or specific handling by themes. This filter attempts to bypass any potential issues by instructing Beaver Builder to render content by its ID, which might resolve layout rendering issues.
This filter, astra_addon_bb_render_content_by_id
, is specific to the Astra theme and Beaver Builder integration. It likely adjusts how content is rendered within Beaver Builder.
Filter Action: __return_true()
is a WordPress function that simply returns true
. By adding this filter, you’re essentially telling Beaver Builder to render content by its ID.
Make sure you understand the implications of adding code to your theme’s functions.php file, especially if you’re not using a child theme. Always backup your site before making such changes, and test thoroughly to ensure it resolves the issue without causing any unintended outcomes.
Refer this doc on How to Add Custom PHP Code?