Ready to get started?Download WordPress


Simple Custom CSS
[resolved] General question (4 posts)

  1. Tony Franco
    Posted 10 months ago #

    Dear Sirs,

    Because of your knowledge, maybe you could help me.. i´m new to all this..

    I started to look for to improve speed of site, and i saw that some CSS and JS are used in pages that it has not to work...

    I ask you, if there is a plugin, that make the JS and CSS of some plugin works just in page that it has to work...?

    Thanks in advance and my apologies by a question out of the plugin..




  2. bjorsq
    Posted 10 months ago #

    Plugins should use the correct methods to enqueue their CSS and Javascript, and if it is not needed sitewide (for instance if the plugin generates a custom post type, and these are the only pages which use it), it shouldn't be queued sitewide. Some plugins will add shortcodes which need CSS or Javascript - as the plugin author doesn't know which page the shortcode is going to be used on, it's easiest to enqueue it for all pages.

    If you have a lot of plugins adding a lot of CSS/JS, and your site is reasonably stable, you could try moving all the CSS/JS to single master files, and edit out the call to wp_head() in your theme header (or use wp_dequeue_script in yout theme's functions.php file to prevent them from being queued)

  3. Tony Franco
    Posted 10 months ago #

    Hello bjorsq,

    Thanks by your reply!

    I´m using now php speedy, and it generates 2 php files of css and js.

    How could i put this php css file at the head? could you help me saying step by step to do it?

    Thanks by your patience!!



  4. John Regan
    Plugin Author

    Posted 10 months ago #

    Marking as Resolved.


You must log in to post.

About this Plugin

About this Topic


No tags yet.