Border Image Sass Mixin

The following is a Sass mixin for the CSS3 border-image property. It sets an image as the border. @mixin border-image($source, $slice, $width, $outset, $repeat) { border-image-source: url($source); border-image-slice: $slice; border-image-width: $width; border-image-outset: $outset; border-image-repeat: $repeat; -webkit-border-image: url($source) $slice $width $outset $repeat; -o-border-image: url($source) $slice $width $outset $repeat; } Here is an example of how-to include the mixin within your Sass file(s): @include border-image("border.png", 100%, 1, 0, stretch); »

Set a Minimum Amount of Words to Publish a Post

There is no minimum amount of words you need to write before you can publish a post. You may want to set a minimum amount of words for posts in order to improve your search engine rankings, improve post quality and if your WordPress installation has multiple authors, deter authors from publishing quick posts that may not have the quality or standards you want, i.e. poor quality. The Code Snippet Simply add this to your theme's functions.php file. »

Save your FTP Information in WordPress

Add the following option in your wp-config.php file to save your FTP information. define ( 'FTP_USER', 'username' ); define ( 'FTP_PASS', 'password' ); define ( 'FTP_HOST', 'ftp.yourdomain.com:21' ); For FTP_HOST, make sure you add the port after the hostname. »

Enable WordPress Caching

Add the following to your wp-config.php file to enable WordPress caching. Some caching plugins require this option, in order for that plugin to work. define( 'WP_CACHE', true ); »

Meta Refresh

Add the following in between the and tags to redirect the visitor to another web page. <meta http-equiv="refresh" content="5;url=http://example.com/" /> In this example, the web page will redirect to example.com after 5 seconds. Change the seconds and URL to whatever you want. Use 0 for immediate redirect. »

Force the WordPress Login to use SSL

By adding this to your wp-config.php file, you'll force your WordPress's login page, wp-login.php, to use a secure SSL connection. define( 'FORCE_SSL_LOGIN', true ); »

Force All Admin Pages to use SSL

Add the following to your wp-config.php file to force all WordPress admin pages to use SSL. define( 'FORCE_SSL_ADMIN', true ); »

Empty the WordPress Trash Bin Every X Days

WordPress features a trash bin, which was add in version 2.9. The trash bin contains any content that you have deleted and automatically empties every 30 days. You can change the 30 days to another interval, by adding the following to your wp-config.php file. define( 'EMPTY_TRASH_DAYS', 7 ); You trash bin will be automatically emptied every 7 days. Change the 7 to whatever you want. By changing the 7 to a 0, the trash bin will be »

Force Trailing Slash

Add the following to your .htaccess file to force a / at the end of the URL. <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} /+[^.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] </IfModule> »

Increase or Decrease WordPress JPEG Quality

By default WordPress will automatically compress your JPEG quality to 90%. To increase or decrease the amount, use the following code snippet: // Increase or decrease JPEG quality function himpfen_jpeg_quality() { return 100; } add_filter( 'jpeg_quality', 'himpfen_jpeg_quality' ); Add the code snippet to your theme's functions.php file. On line 3, you'll see the number 100. This is the percentage you want your jpeg quality to be. Change it to whatever you want - anything below 90 is »

Share this via... Twitter Facebook Google+ Stumbleupon LinkedIn Reddit Email