• Resolved twowithink

    (@twowithink)


    Home page hero background image has a major shift/blink until first interaction when WP Rocket Delay JavaScript Execution is enabled: https://beta.speechworks.net/

    I have tried exhaustively to figure out what JS files to exclude in order to remedy the behavior to no avail and take advantage of at least some of the Delay JavaScript Execution benefits in Google Speed Tests.

    We are using ThemeTrust Create Theme and SiteOrigin Page Builder.

    Thank you in advance for your assistance.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Support Andrew Misplon

    (@misplon)

    Hi

    Does the issue resolve when WP Rocket Delay JavaScript Execution is temporarily deactivated?

    Thread Starter twowithink

    (@twowithink)

    Yes.

    Plugin Support Andrew Misplon

    (@misplon)

    Understood. You could try excluding the following for the Hero:

    /wp-content/plugins/so-widgets-bundle/js/slider/jquery.slider.min.js

    Or for Page Builder:


    /wp-content/plugins/siteorigin-panels/js/styling.min.js

    Thread Starter twowithink

    (@twowithink)

    Hi,

    Excluding /wp-content/plugins/siteorigin-panels/js/styling.min.js has no initial effect and then breaks full width on first interation.

    I’m not using the Hero widget, rather just a regular full-width row with a background.

    Any further thoughts? This issue has not come up with other users?

    Thanks,

    Plugin Support Andrew Misplon

    (@misplon)

    Thanks for the feedback. If possible, please, show us the page with Delay JavaScript Execution deactivated.

    Thread Starter twowithink

    (@twowithink)

    Try now. Thanks!

    Plugin Support Andrew Misplon

    (@misplon)

    To confirm, you now aren’t seeing the same major shift if you open the page in a new browser or a private browsing window?

    Thread Starter twowithink

    (@twowithink)

    Correct.

    Plugin Support Andrew Misplon

    (@misplon)

    Page Builder uses JS full-width rows by default to allow for compatibility with any theme. I’m unsure how much of what you’re seeing is the container break and how much is due to WP Rocket.

    You can change to full-width CSS containers but it takes a bit of customization. Please, find the filters at the following URL https://siteorigin.com/page-builder/advanced-customizations/#heading-full-width-containers-using-css.

    The values for Create will probably be:

    add_filter( 'siteorigin_panels_theme_container_width', function( $container ) {
    return '1200px';
    } );

    add_filter( 'siteorigin_panels_theme_container_selector', function( $selector ) {
    return '.body-wrap';
    } );

    Plugin Support Andrew Misplon

    (@misplon)

    Create is making adjustments to Page Builder using JS and CSS. You can perhaps also try excluding:

    /wp-content/cache/min/1/wp-content/themes/themetrust-create/js/theme_trust.js

    Thread Starter twowithink

    (@twowithink)

    Hi, The custom functions just create standard width rows. I am looking for full browser width.

    Excluding /wp-content/cache/min/1/wp-content/themes/themetrust-create/js/theme_trust.js had no affect.

    Plugin Support Andrew Misplon

    (@misplon)

    Thanks for trying the exclusion.

    Did you perhaps try the filters above? They replace Page Builder’s JavaScript full-width row functionality with CSS. More information on the two filters is available at https://siteorigin.com/page-builder/advanced-customizations/#heading-full-width-containers-using-css. I’m offline for the night. Unfortunately, at the moment, I don’t have any other ideas.

    Thread Starter twowithink

    (@twowithink)

    Yes, I did try adding the custom functions. They just created a 1200px standard width row with background image. I am looking for the background to display full browser width. Thanks.

    Plugin Support Andrew Misplon

    (@misplon)

    Thanks. It sounds like the siteorigin_panels_theme_container_selector is incorrect. We’ll test with Create this weekend and get back to you with a solution.

    Plugin Contributor alexgso

    (@alexgso)

    Hi twowithink,

    I’ve had a look at Create and I’ve come up with an updated snippet. Please try replacing the previously provided PHP with the following PHP:

    add_filter( 'siteorigin_panels_theme_container_width', function( $container ) {
      return '1200px';
    } );
    
    add_filter( 'siteorigin_panels_theme_container_selector', function( $selector ) {
      return '.siteorigin-panels .body-wrap';
    } );

    Some additional CSS on top of this will also be required due to how Create sets its container. Please add the following CSS to Appearance > Customize, Additional CSS:

    .siteorigin-panels.siteorigin-panels-css-container .body-wrap {
    	max-width: none !important;
    }

    As for WP Rocket, please also try excluding /wp-content/plugins/so-widgets-bundle/js/jquery.cycle.min.js


    Kind regards,
    Alex

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘WP Rocket Delay JavaScript Execution Issue’ is closed to new replies.