Created
May 14, 2021 11:31
-
-
Save codezz/f5686a8546759b7ad3ccea6fc9ae9bf6 to your computer and use it in GitHub Desktop.
BuddyBuilder override template with Elementor canvas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * This overrides BuddyBuilder template for BuddyPress pages with Elementor canvas template. | |
| */ | |
| add_filter( 'buddy_builder/page_template ', function ( $template ) { | |
| if ( ! class_exists( '\Elementor\Plugin' ) ) { | |
| return $template; | |
| } | |
| $page_templates_module = \Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' ); | |
| return $page_templates_module->get_template_path( 'elementor_canvas' ); | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment