Elementor is a powerful WordPress page builder, but its free version can sometimes feel cluttered with promotional elements. This guide will show you how to remove most of these upsells, creating a cleaner and more focused interface.
Understanding the Approach
Before we begin, it’s important to note that the simplest way to remove Elementor upsells is by purchasing Elementor Pro. However, if you’re not ready for that commitment, this guide offers an alternative solution.
While we understand the need for revenue generation, users of free GPL products should have the freedom to modify the software as they see fit.
Setting Up the Removal Class
We’ll start by creating a PHP class to handle the removal of upsells. This class will ensure that nothing is affected if you upgrade to Elementor Pro in the future.
/**
* Remove Elementor Upsells.
*/
class Remove_Elementor_Upsells {
/**
* Constructor.
*/
public function __construct() {
if ( did_action( 'elementor/loaded' ) ) {
$this->register_actions();
} else {
add_action( 'elementor/loaded', [ $this, 'register_actions' ] );
}
}
/**
* Register our main class actions.
*/
public function register_actions(): void {
if ( is_callable( 'Elementor\Utils::has_pro' ) && Elementor\Utils::has_pro() ) {
return; // bail early if we are using Elementor Pro.
}
// We will add actions here...
}
}
new Remove_Elementor_Upsells();
Removing Admin Pages and Links
Let’s start by removing unnecessary admin pages and links:
Step 1: Add this method to your class:
public function remove_admin_pages( $menu_manager, $hooks ): void {
$pages_to_remove = [];
$subpages_to_remove = [];
if ( is_callable( [ $menu_manager, 'get_all' ] ) ) {
foreach ( (array) $menu_manager->get_all() as $item_slug => $item ) {
if ( isset( $hooks[ $item_slug ] )
&& is_object( $item )
&& ( is_subclass_of( $item, 'Elementor\Modules\Promotions\AdminMenuItems\Base_Promotion_Item' )
|| is_subclass_of( $item, 'Elementor\Modules\Promotions\AdminMenuItems\Base_Promotion_Template' )
|| 'elementor-apps' === $item_slug
)
) {
$parent_slug = is_callable( [ $item, 'get_parent_slug' ] ) ? $item->get_parent_slug() : '';
if ( ! empty( $parent_slug ) ) {
$subpages_to_remove[] = [ $parent_slug, $item_slug ];
} else {
$pages_to_remove[] = $hooks[ $item_slug ];
}
}
}
}
foreach ( $pages_to_remove as $menu_slug ) {
remove_menu_page( $menu_slug );
}
foreach ( $subpages_to_remove as $subpage ) {
remove_submenu_page( $subpage , $subpage );
}
remove_submenu_page( 'elementor', 'go_knowledge_base_site' );
remove_submenu_page( 'elementor', 'go_elementor_pro' );
if ( ! isset( $_GET['page'] ) || 'elementor-app' !== $_GET['page'] ) {
remove_submenu_page( 'edit.php?post_type=elementor_library', 'elementor-app' );
}
}
Step 2: Add this action to your register_actions
method:
add_action( 'elementor/admin/menu/after_register', [ $this, 'remove_admin_pages' ], PHP_INT_MAX, 2 );
Cleaning Up the Admin Bar
To remove upsell elements from the admin bar:
Step 1: Add this method to your class:
public function admin_top_bar_css(): void {
$target_icon_classes = [
'.eicon-integration', // Add-ons
'.eicon-upgrade-crown', // Upgrade now
];
wp_add_inline_style(
'elementor-admin-top-bar',
'.e-admin-top-bar__bar-button:has(' . implode( ',', $target_icon_classes ) . '){display:none!important;}'
);
}
Step 2: Add this action to your register_actions
method:
add_action( 'elementor/admin_top_bar/before_enqueue_scripts', [ $this, 'admin_top_bar_css' ] );
Removing Theme Builder References
To remove Theme Builder links and references:
Step 1: Add this method to your class:
public function modify_admin_bar( $admin_bar_config ) {
if ( isset( $admin_bar_config['elementor_edit_page']['children'] )
&& is_array( $admin_bar_config['elementor_edit_page']['children'] )
) {
foreach ( $admin_bar_config['elementor_edit_page']['children'] as $k => $item ) {
if ( isset( $item['id'] ) && 'elementor_app_site_editor' === $item['id'] ) {
unset( $admin_bar_config['elementor_edit_page']['children'][ $k ] );
break;
}
}
}
return $admin_bar_config;
}
Step 2: Add this filter to your register_actions
method:
add_filter( 'elementor/frontend/admin_bar/settings', [ $this, 'modify_admin_bar' ], PHP_INT_MAX );
Cleaning Up the Elementor Editor
To remove promotional elements from the Elementor editor:
Step 1: Add this method to your class:
public function editor_css(): void {
wp_add_inline_style(
'elementor-editor',
'.e-notice-bar,.elementor-element-wrapper.elementor-element--promotion,#elementor-panel-category-pro-elements,#elementor-panel-category-theme-elements,#elementor-panel-category-theme-elements-single,#elementor-panel-category-woocommerce-elements,#elementor-panel-get-pro-elements,#elementor-panel-get-pro-elements-sticky,.elementor-control-dynamic-switcher,.elementor-control:has(.e-control-promotion__lock-wrapper){display:none!important;}.elementor-control-type-wysiwyg .tmce-active .switch-html{border-inline-end:0;}'
);
}
Step 2: Add this action to your register_actions
method:
add_action( 'elementor/editor/after_enqueue_styles', [ $this, 'editor_css' ] );
Removing the Dashboard Widget
To remove the Elementor dashboard widget:
Step 1: Add this method to your class:
public function remove_dashboard_widget(): void {
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal' );
}
Step 2: Add this action to your register_actions
method:
add_action( 'wp_dashboard_setup', [ $this, 'remove_dashboard_widget' ], PHP_INT_MAX );
Conclusion
By implementing these changes, you can significantly reduce the promotional elements in the free version of Elementor, creating a cleaner user interface. However, if you find Elementor valuable for your work, consider supporting the developers by purchasing Elementor Pro when possible.
Remember to test these changes thoroughly on a staging site before applying them to your live website. If you encounter any issues or notice new promotional elements that aren’t covered here, you may need to update the code accordingly.