Created
May 28, 2020 01:00
-
-
Save digisavvy/ed308d57b6b334d91001adb338ebd8bd to your computer and use it in GitHub Desktop.
A simple check if the current page is using ELementor
This file contains 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 // Do not include this line. | |
$post_id = get_the_ID(); // Set post ID var. | |
if ( Elementor\Plugin::instance()->db->is_built_with_elementor( $post_id ) ) { | |
echo 'fuck yeah it is!'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elementor\Plugin::instance()->documents->get( $post_id )->is_built_with_elementor()
works for me