Support » Plugin: Simple Custom CSS » General question

  • Resolved Tony Franco

    (@tony-franco)


    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..

    Regards,

    Tony

    http://wordpress.org/plugins/simple-custom-css/

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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)

    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!!

    Regards,

    Tony

    Plugin Author John Regan

    (@johnregan3)

    Marking as Resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘General question’ is closed to new replies.