Title: WordPress #deferload broken
Last modified: November 8, 2023

---

# WordPress #deferload broken

 *  [rtlaird](https://wordpress.org/support/users/rtlaird/)
 * (@rtlaird)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/wordpress-deferload-broken/)
 * wp_enqueue_script() with #deferload is broken.
 * Renders to the page with errors such as:
 * Loading failed for the <script> with source “[https://samedayrules.com/wp-content/themes/picostrap5-child-base/js/bootstrap.bundle.min.js’%20defer=’defer](https://samedayrules.com/wp-content/themes/picostrap5-child-base/js/bootstrap.bundle.min.js'%20defer='defer)”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-deferload-broken%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/wordpress-deferload-broken/#post-17185660)
 * Try reviewing the following tutorial:
    [https://www.wpbeginner.com/wp-tutorials/how-to-fix-failed-to-load-resource-error-in-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-fix-failed-to-load-resource-error-in-wordpress/)
 *  [and74](https://wordpress.org/support/users/and74/)
 * (@and74)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/wordpress-deferload-broken/#post-17186019)
 * I just had the same problem, in your child themes functions.php file, find the
   bit that looks something like this:
 * wp_enqueue_script( ‘bootstrap5-childtheme’, get_stylesheet_directory_uri() . “/
   js/bootstrap.bundle.min.js#asyncload”, array(), null, true );
 * change it to this:
 * wp_enqueue_script( ‘bootstrap5-childtheme’, get_stylesheet_directory_uri() . “/
   js/bootstrap.bundle.min.js”, array(), null, array(‘in_footer’ => true, ‘strategy’
   => ‘async’) );

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress #deferload broken’ is closed to new replies.

## Tags

 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [and74](https://wordpress.org/support/users/and74/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/wordpress-deferload-broken/#post-17186019)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
