Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm finding that plugins completely destroy my source formatting and generally suck at following standards.

How can I absolutely block all style-sheets and move all .js to the footer of the site without modifying the plugins or adding an additional plugin?

Here's an example of what my homepage looks like under their rule http://pastebin.com/KRxRyYM7

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

WordPress plugins usually enqueue's their stylesheets and js files using wp_enqueue_style and wp_enqueue_script functions. You can dequeue script / dequeue style the scripts/styles if you don't want them in your theme. These css/js files usually loads with wp_head() action, which usually resides in your header.php in the theme

share|improve this answer
    
+1, but I'd say that they shouldn't be enqueued/registered in header.php. this is stuff for functions.php. –  kaiser Aug 17 '11 at 22:42
    
wait, I'm confused. Wouldn't you always enque or register it in functions.php? –  Zach Shallbetter Aug 18 '11 at 17:56
1  
Yes, you can just use like this ` function theme_dequeue() { wp_dequeue_script( 'KEY_NAME' ); } add_action( 'template_redirect', 'theme_dequeue' );` You just need to find out the KEY_NAME of that script when it was enqueued. –  Tareq Aug 24 '11 at 11:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.