Month: September 2013

Changing WordPress’ Autosave Frequency and Post Revisions

WordPress has a very nifty autosave feature which can be a lifesaver to anyone who uses WordPress. The downside to WordPress’ autosave, is that it creates a bunch of draft posts increasing your mySQL database size, especially if you write the post within WordPress’ post editor. If desired, it is possible to change WordPress’ autosave …

Changing WordPress’ Autosave Frequency and Post Revisions Read More »

WordPress : Fixing Pagination on Custom Queries With query_posts

First off, custom queries are good for calling or excluding certain posts to a page.  Lets say we want to display 5 posts per page from category 10.  The best place to learn how to do this is the Codex.  You would probably start after reading that article like this: <?php query_posts(‘posts_per_page=5&cat=10’); ?> Now technically …

WordPress : Fixing Pagination on Custom Queries With query_posts Read More »

Redirecting non-www to www with .htaccess and vice-versa

If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] This will redirect any requests to http://my-domain.com to http://www.my-domain.com. There are several benefits from doing that: It …

Redirecting non-www to www with .htaccess and vice-versa Read More »