In attempting to boost the performance of my website, I've noticed that Wordpress is enqueuing a lot of the admin relevant scripts and stylesheets on the front end.
I'm wondering how I can stop this from happening...I was thinking about dequeueing all of the offending, but then my server response time would be slightly slowed.
Is there a tried and tested way of doing this?
In attempting to boost the performance of my website, I've noticed that Wordpress is enqueuing a lot of the admin relevant scripts and stylesheets on the front end.
I'm wondering how I can stop this from happening...I was thinking about dequeueing all of the offending, but then my server response time would be slightly slowed.
Is there a tried and tested way of doing this?
Share Improve this question asked Apr 5, 2019 at 16:38 Micheal J. RobertsMicheal J. Roberts 1033 bronze badges 9 | Show 4 more comments1 Answer
Reset to default 1If your bootstrap or other enqueued scripts have a dependency or name conflict, this could enqueue all these scripts. There are a large number of common scripts in WordPress core that are enqueued under common names. I always recommend prefixing your script names with something specific.
wp_enqueue_script( 'theme-bootstrap', 'https://stackpath.bootstrapcdn/bootstrap/4.3.1/js/bootstrap.min.js', array( 'jquery' ), '4.3.1', true );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745615454a4636207.html
/wp-includes/js/wp-embed.min.js
and/wp-includes/js/wp-emoji-release.min.js
. If other scripts are enqueued, something in your theme or plugins must be doing this. – MikeNGarrett Commented Apr 5, 2019 at 16:41