At hello, we handle various tasks, including optimizing websites that heavily utilized Elementor. We've encountered numerous clients seeking a complete redesign of their site—ranging from homepages to article pages. Often, these sites suffer from performance issues, as indicated by low Lighthouse scores. Our recommended solution involves transitioning from Elementor to custom themes, which we tailor specifically for each client.
Why a Custom Theme?
Opting for a custom theme improves site speed, reduces extraneous code, and enhances SEO. Additionally, it preserves the ability to customize via ACF custom fields from the WordPress admin panel, providing flexibility without the bloat.
Challenges We've Faced
In transitioning away from Elementor, several unique challenges arise:
- What if Elementor templates within an article include crucial CTAs? Removing Elementor risks losing these elements, potentially causing drastic drops in conversion rates. Our solution ensures that critical business components are preserved or seamlessly integrated into the new custom design.
- What happens to landing pages linked to active campaigns? Directly disabling Elementor on these pages could lead to non-functional, broken pages, wasting significant campaign traffic and investment. Our strategy includes maintaining Elementor functionality selectively to uphold the integrity of ongoing marketing efforts.
These are just two common problems that we’ve faced, but the more websites we encounter, the more problems we find. It seems like there’s no choice; we can't just disable Elementor and lose important business logic.
Our Proven Solution
While the website will look mostly good after disabling the "theme builder" templates for their respective parts, closer inspection will reveal problems. For example, the homepage will seamlessly align with our custom theme once we disable the Elementor homepage template, but we still might have unwanted code loaded for the homepage, even though it doesn’t use Elementor.
While each site has its own specific needs, we've devised a versatile solution that fits most cases. We selectively disable Elementor on most pages while keeping it active on others, such as specific landing pages and older blog posts.
Here's how we implement this strategy:
function disable_elementor_on_certain_pages() {
global $post;
// Pages where Elementor should remain active
$allowed_pages = ['lp-1', 'lp-2'];
// Check if the current page is in the allowed list or accessed via admin panel
if (is_page($allowed_pages) || is_admin()) {
return;
}
// Check if the current post is a post and older than the cutoff date
if ($post && $post->post_type === 'post') {
$post_date = new DateTime($post->post_date);
$cutoff_date = new DateTime('2024-06-02');
if ($post_date < $cutoff_date) {
return;
}
}
// Deregister Elementor styles and scripts on pages where it's not needed
wp_deregister_style('elementor-frontend');
wp_deregister_script('elementor-frontend');
}
add_action('wp_enqueue_scripts', 'disable_elementor_on_certain_pages', 20);
This approach ensures that we maintain the functionality of essential business components while enhancing overall site performance by eliminating unnecessary Elementor assets where they are no longer needed.
Enhance Your Website with Us
At hello, we draw from a rich vein of experience to deliver robust, SEO-friendly, and tailored web solutions. If you're aiming to enhance your digital footprint, we’re ready to elevate your site's performance and user experience. Let’s connect and transform your website into a sleek, efficient, and engaging platform.