Archive by Author

Caching get_posts()

get_posts() is a nice little function and is widely used within themes and plugins, but what most people don’t keep in mind is that there is at least one database query behind each of the calls. With taxonomy,category or meta queries it’s even more, so caching the result of this function can have quite an […]

Continue reading

Snippet – Spot bad queries in WordPress the quick&dirty way

Here’s a little piece of code I use for debugging when I evaluate sites and themes which I don’t know in detail. I simply drop this in a file and include this file from within the themes’ functions.php or simply by dropping it in wp-content/mu-plugins as something like 0-my-debugging.php or the like. Then all you […]

Continue reading

Updated WordPress Documentation API

I just updated the Documentation API and created a more lightweight design at http://lookup.hitchhackerguide.com/ in order to create a better integration in IDEs such as Coda. This lookup tool now also will give you some results for native PHP functions.

Continue reading

WP-Cron-Control lets you take control over wp-cron execution

Did you ever wonder when your scheduled wp-cron tasks get executed or ran into trouble when your scheduled posts did not get published? If that’s the case then you might want to take wp-cron-control for a spin. This small plugin allows you to disable the normal wp-cron processing that is usually hooked into the sanitize_comment_cookies […]

Continue reading

Initialize WordPress from a PHP CLI script

I sometimes run scripts from the command line and still need WordPress functionality and the regular WordPress environment. Here’s a very basic script that I usually use as a structure for this kind of actions.

Continue reading