Register Elementor Pro Theme Locations
Registers Elementor Pro's header, footer, single and archive locations for themes that do not do it themselves, so Theme Builder templates can replace those areas.
Opens WPIDE on
Code
add_action( 'elementor/theme/register_locations', function ( $theme_manager ) {
if ( method_exists( $theme_manager, 'register_all_core_location' ) ) {
$theme_manager->register_all_core_location();
}
} );
Notes
Needs Elementor Pro. Hello Elementor, Astra, GeneratePress and most popular themes already register these.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.