PHP Check If Elementor is Used in The Page or Post
With this 2 php controls you can check if the page is edited with elementor or the page is_elementor_page
so you can do something with it.
if ( Elementor\Plugin::instance()->db->is_built_with_elementor( get_the_ID()) ) {
//page is build with elementor
}
// other solution or by checking directly
$elementor_page = get_post_meta( get_the_ID(), '_elementor_edit_mode', true );
if ( ! ! $elementor_page ) {
//page is build with elementor
}
keep it mind if elementor Canvas is used on the page, elementor avoids the all theme files !
For example doesnt read the page.php at all.. it just avoids wordpress template hierarchy…