Never-Ending Pagination in WordPress

Take your site’s slideshows to the next level with the following: The next part actually filters the wp_link_pages arguments and decides where to put a next button where one didn’t previously exist. I also threw in an additional previous button, which uses some javascript to take the user back to the previous page. There’s probably […]

SQL_CALC_FOUND_ROWS and no_found_rows

By default, the WordPress SQL query that selects posts from the database will use “SELECT SQL_CALC_FOUND_ROWS …”. This is mainly for pagination purposes, to speed up subsequent queries for the next set of results. Writing the query that way certainly helps speed up the site as a whole, but is useless in some circumstances. Remedy: […]

Merry Christmas, Now Patch Your WordPress Sites!

Thanks to the release of http://seclists.org/fulldisclosure/2012/Dec/242 on Christmas Eve, I’ve spent my holiday working security for several sites. This exploit allows an attacker to take advantage of the “open” nature of W3 Total Cache’s cache files to extract password hashes from the database cache. I agree with JasonĀ on this – why did the author of […]

Rewrite WP Attachment Images on the Fly

At first, this may not seem to have any real-world use, but consider this: You need to set up an independent development environment for your site, and you’d rather not copy gigabytes of files from your production server’s wp-content directory. Without the following function, keeping everything synced could turn into another full-time job, especially if […]