The WP_Styles class in WordPress allows for a few extra bits of fine-tuning via the extra property, which is amended by calling add_data( $handle, $key, $value ) method on the global $wp_styles.
Enqueued Style Sheet Extras Fine-tuning your additional style sheets
HTTP Error Fix Can now upload large images
When uploading large images over an approximate size (~2500×2000) I was encountering the HTTP Error message when trying to crunch the image (which ultimately fails and doesn’t produce the smaller pre-defined image sizes).
After trying several solutions, the following appears to have solved it for my setup, once and for all – add this to your .htaccess file:
Style Sheet Header Improvements Tidy up your WordPress Theme Details
The Theme Review Guidelines are often updated as each new version of WordPress is released, and although these guidelines are for themes submitted to the WordPress theme repository, they are a good baseline to which all themes should strive to achieve.
If your theme was written a while ago, your site might not be following all of the current best practices. Here are a few simple alterations you can make to your style.css file.
Install WordPress via SSH
- SSH into your server, then navigate to your domain’s web root:
cd /var/www/vhosts/example.com/httpdocs - Grab the latest WP install
wget http://wordpress.org/latest.tar.gz - Get the files out of the archive:
tar xfz latest.tar.gz - Navigate to the
wordpresssubfolder:
cd wordpress - Copy everything back up to the web root:
cp -rpf * ../ - Navigate back up to web root:
cd .. - Remove the
wordpresssubfolder:
rm -rf wordpress - Remove the downloaded archive file:
rm -f latest.tar.gz
How to Conditionally Add Style Sheets for IE in WordPress
Update: http://code.garyjones.co.uk/enqueued-style-sheet-extras/#ie
Over time, Internet Explorer (IE) is getting better at rendering web pages how we want them, but while IE7 and earlier versions still have a (fast-fading) grip, we sometimes still need to provide exclusive styles to make them render our sites in an acceptable way. That is where conditional style sheets are used.
View the code