Skip to content

βœ… ⚑Help Elementor and WordPress test a performance improvement! 🧐 #35405

Closed

Description

@nicholaszein

Hey beta testers!

We are seeking help from the community to ensure a performance improvement for both Elementor and WordPress is implemented. We would greatly appreciate your feedback! πŸ™

[UPDATE]: We added a newer build for Elementor Core.

Background

WordPress version 6.9 introduced a new method for enqueueing CSS and improving performance for Block Themes and the Block Editor.

While this method improved the Block Editor's performance, it caused some issues with how Elementor handles enqueueing styles for templates. Both methods are similar, but the one introduced by WordPress prevented some Template Styles from loading in some cases. As a workaround we temporarily disabled this feature to ensure this problem wouldn't occur.

Since then, we've been working closely with the WordPress team to ensure full compatibility with this method, and they have generously helped us by introducing new improvements to this method regarding CSS loading in Classic Themes as well.

The Problem

While this issue was initially reproduced by some users, we were never able to reproduce it ourselves, leading us to conclude this problem may be influenced by other environmental factors beyond our control.

The patches introduced here seem to solve the initial issues caused by the new WordPress method without us needing to disable it. But we cannot release them without verifying with the community (or those initially affected by the issue) if they indeed solve this issue.

We need your help!

Please help Elementor and the WordPress Core team with verifying if this patch fixes the incompatibility introduced.

Instructions

Here's how you can help us:

  1. On a testing/staging WordPress environment install WordPress version 7.0-RC2-62153 using the WordPress Beta Tester plugin (more info here).
  2. Install the Hello Elementor theme.
  3. Install this special build of Elementor Core v4.1.0-20260403.1727.
  4. (Optional) Install and Activate Elementor Pro.
  5. Clear, Purge, and Disable any level of cache to ensure cache cannot affect the outcome.
  6. Open the local Template Library on your site, and create a new Elementor Template.
  7. Add widgets inside your Template (or import from the Elementor Library), and Publish it.
  8. If you have only Elementor Core installed go back to the Elementor > Editor > Templates, locate the template you just created and copy the template shortcode. If you have Elementor Pro installed, skip this step.
  9. Create a new Page and Edit it with Elementor.
  10. For Core-only users: Drag and Drop the Shortcode widget, and paste the shortcode of the Template you've just created.
    For Pro users: Drag and Drop the Template widget and select the template you've published in step 7.
  11. Publish the page and view it on the Frontend.
  12. Share the results with us in the comments below, (include a copy of your Elementor System Info. in case there is a problem). πŸ‘‡

Expected behavior

The template styles should be loaded correctly on the frontend.


Thank you all for your contribution! πŸ™

Special thanks to these users who helped us with this issue:

Activity

  1. added theissue type on Apr 3, 2026
  2. added
    help wantedAnnouncements that request help from users, like Public Beta testing programs.
    type/performanceIndicates when a topic is related to Performance.
    mod*[Temp.] For internal use only.
    document/assetsReferences any asset (CSS, JS) generated for any document - Posts, Pages, Popups, Templates, etc.
    compatibility/wordpress-editorIndicates a compatibility problem with the WordPress Block or Classic editors.
    on Apr 3, 2026
  3. pinned this issue on Apr 3, 2026
  4. jpguisa commented on Apr 9, 2026

    @jpguisa

    @nicholaszein Hey there, I tested this on a fresh env and everything looks good meanwhile in the site where I originally had this template widget issue I am having the same problem but only with my custom theme, if I switch to any other theme it works correctly. I ended up realizing that I had to remove the wp_footer() function from my footer.php, not sure why. I am using Elementor Theme builder for Header and Footer. Removing the wp_footer() indeeds solve the problem and it doesn't bring any issues by doing that but I am curious why other themes have it and the template widget styles loads correctly. Any hint?

  5. nicholaszein commented on Apr 9, 2026

    @nicholaszein
    MemberAuthor

    Hi @jpguisa, thank you so much for sharing your feedback! πŸ™

    This will really help us! πŸ’ͺ

    Would you be so kind to share your Elementor System Info for the existing site with the footer problem?

    We would also love to take a look at your fitter site part code to see if we can find a reason why it only works if you remove wp_footer() from the template.

    Also, take a look at this documentation to see how Elementor handles template parts, this might help figure out the problem with your footer:

    https://developers.elementor.com/docs/themes/

    If you don't mind sharing the full custom theme, this would allow us to test it out in loco. But it's completely up to you.

    Thank you again for taking the time to test this, we really appreciate it! πŸ™

  6. jpguisa commented on Apr 9, 2026

    @jpguisa

    @nicholaszein I can provide full access to my staging site. If that works, let me know how could I send you the credentials.

  7. Mij-Strebor commented on Apr 9, 2026

    @Mij-Strebor

    I had no problems with this script. I created a Header template with some Atomic elements and then put the template into a Template widget in a page. Displayed the page and it was correct.

    system-info-localhost-09-04-2026.txt

  8. louiswol94 commented on Apr 9, 2026

    @louiswol94
    Contributor

    @nicholaszein Hey there, I tested this on a fresh env and everything looks good meanwhile in the site where I originally had this template widget issue I am having the same problem but only with my custom theme, if I switch to any other theme it works correctly. I ended up realizing that I had to remove the wp_footer() function from my footer.php, not sure why. I am using Elementor Theme builder for Header and Footer. Removing the wp_footer() indeeds solve the problem and it doesn't bring any issues by doing that but I am curious why other themes have it and the template widget styles loads correctly. Any hint?

    @jpguisa Thank you so much! This will really help us!

    Do you mind creating a temporary login link on the staging site via https://wordpress.org/plugins/temporary-login/ - and send it to me at louis@elementor.red?

    Warm regards
    Louis

  9. nicholaszein commented on Apr 9, 2026

    @nicholaszein
    MemberAuthor

    Thank you for the confirmation @Mij-Strebor! We really appreciate it! πŸ™πŸ™ŒπŸ«Ά

  10. louiswol94 commented on Apr 9, 2026

    @louiswol94
    Contributor

    Hi everyone,

    I am happy to report that it seems like we have found the root cause of the original issue.

    It is much thanks to @jpguisa for giving us access to his staging environment and assisting with debugging. So thank you, we could not have done it without you!

    I will add some technical details here for anyone interested:

    The Problem:

    Elementor Pro's get_footer() first calls wp_footer() in theme-support-footer.php, then loads the theme's footer.php inside ob_start()/ob_get_clean() in theme-support.php to discard its output (and cause it to not be loaded again later - via a require_once). But if the theme's footer.php (usually a non "Elementor aware" theme) also calls wp_footer(), it runs a second time inside the discarded buffer.

    When wp_footer() runs inside this discarded buffer:

    • Styles are processed and their <link> tags are printed (to the discarded buffer)
    • Styles are marked as "done" in $wp_styles->done
    • The buffer is then thrown away

    Result: WordPress thinks the styles were already printed (they're in "done"), so it never prints them again. But the actual <link> tags were discarded and never reached the page.

    The Fix:

    Add remove_all_actions( 'wp_footer' ) before loading the theme's footer.php - matching the existing pattern we already have for wp_head in get_header():

    // wp-content/plugins/elementor-pro/modules/theme-builder/classes/theme-support.php
    remove_all_actions( 'wp_footer' ); // Avoid running wp_footer hooks again
    ob_start();
    locate_template( $templates, true );
    ob_get_clean();
    

    Affected: Any theme with wp_footer() in footer.php that doesn't use elementor_theme_do_location() would have had the bug of missing CSS.

    If anyone else that experienced the original issue would like to verify that the fix in theme-support.php works that would be really helpful πŸ™

    We are still running our full automated test suite to verify that it does not cause any unexpected side effects, but so far from manual tests everything looks good.

    We will also be able to remove the original patch we added in Elementor Core - cc @westonruter

    Thanks everyone! πŸ™Œ

  11. unpinned this issue on Apr 14, 2026
  12. added
    status/mergedIndicates when a Pull Request has been merged to a Release.
    solvedIndicates that an Issue has been Solved, or a Feature Request has been Released.
    mod/c*[Temp.] For internal use only.
    mod/s*[Temp.] For internal use only.
    on Jun 17, 2026
  13. changed the title [-]⚑Help Elementor and WordPress test a performance improvement! 🧐[/-] [+]βœ… ⚑Help Elementor and WordPress test a performance improvement! 🧐[/+] on Jun 17, 2026
  14. locked as resolved and limited conversation to collaborators on Jun 17, 2026
  15. nicholaszein commented on Jun 17, 2026

    @nicholaszein
    MemberAuthor

    Hey @jpguisa and @Mij-Strebor,

    thank you so much for helping with this initiative! πŸ™

    Cheers! πŸ₯‚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

announcementUsed for general announcements.compatibility/wordpress-editorIndicates a compatibility problem with the WordPress Block or Classic editors.document/assetsReferences any asset (CSS, JS) generated for any document - Posts, Pages, Popups, Templates, etc.help wantedAnnouncements that request help from users, like Public Beta testing programs.mod*[Temp.] For internal use only.mod/c*[Temp.] For internal use only.mod/s*[Temp.] For internal use only.solvedIndicates that an Issue has been Solved, or a Feature Request has been Released.status/mergedIndicates when a Pull Request has been merged to a Release.type/performanceIndicates when a topic is related to Performance.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions