@ryan.murray
To make a WordPress theme compatible with Elementor, you can follow these steps:
1 2 3 |
add_action( 'after_setup_theme', function() { add_theme_support( 'elementor' ); } ); |
1 2 3 4 5 6 7 |
add_action( 'wp_enqueue_scripts', function() { if ( defined( 'ELEMENTOR_VERSION' ) ) { wp_enqueue_style( 'elementor-frontend' ); wp_enqueue_style( 'elementor-global-css' ); wp_enqueue_script( 'elementor-frontend' ); } } ); |
1 2 3 |
if ( ! isset( $content_width ) ){ $content_width = 1170; } |
By following these steps, you can make your WordPress theme compatible with Elementor and provide users with the flexibility to customize their websites using the Elementor page builder.