Pointing your home site’s url to a subdirectory using htaccess for wordpress

Exactly what it sounds like. Just saved me a butt load of time and a mess of annoying phone calls to the hosting server. Easy code editing then moving of the index.php & .htaccess files. Maybe this’ll do the same for any other developers out there in a bind.

Your welcome

Display Popular Posts by Views / Clicks in WordPress

Cool code I found that allows you to filter and display a WP site’s posts by views or “clicks”. If also works for custom post types as well perfectly. Simply add the filter “post_type => YOUR_CUSTOM_POSTTYPE”  when you call the loop on the front end in the WP_QUERY function.

Click Here for the code

 

Backup Your MySQL Database Using PHP

This powerful php function by David Walsh has helped me automatically back up a mysql database. Use as needed, throw in a function to auto call or have the client choose to do it if needed.

Love it! Here’s the link: http://davidwalsh.name/backup-mysql-database-php

**NOTE this is an old blog post so the php function uses ereg_replace which you’ll need to manually update to the proper preg_replace

Target CSS for Chrome, IE, Firefox, and/OR Safari with custom CSS media queries by BrowserHacks

As simple as it gets… Use the css media querie code they provide to target any (yes ANY particular) browser.

Truly convenient for any last minute changes if something looks perfect in Firefox but not in Chrome.

Get the code at:
BrowserHacks.com