August 01, 2011
I wanted to setup a simple lightbox photo gallery on a WordPress site (v3.2.1) and, to avoid installing a slew of plugins, I put together a little gallery shortcode function using the built-in WordPress gallery shortcode as my starting point. I’m a big fan of PrettyPhoto, so I modified the output of the gallery shortcode to include the needed rel= attribute for PrettyPhoto galleries. (more…)
July 27, 2011
I recently needed to output a list of comments and bumped into a little trouble trying to output the comment excerpt. Usually I would use the built-in comment_excerpt() function but I only needed 10 words instead of the 20 that is hard-coded. I put together a little function that I found helpful and thought I would share.
(more…)
July 27, 2011
While setting up a store using WP e-Commerce (v3.8.5 at the time of development) I noticed that the Category Product List Shortcode was no longer working for me.
I cooked up a quick shortcode function using some of their product list code that will query the products by the passed category and output them using the product template. (more…)
March 10, 2009
After upgrading a friend’s blog to WordPress 2.7 we started noticing his pageview numbers in AWStats going through the roof, without a corresponding increase in visitors. Here’s a screenshot:

Google Analytics was showing normal pageview numbers, so we knew something was amiss. When we looked at the most viewed pages in awstats, it became obvious:

AWStats has always counted pageviews on the WordPress backend, but compared to the total pageviews the impact was negligible. However, now that WordPress 2.7 makes so many AJAX calls to admin-ajax.php (primarily for saving drafts), we must exclude these pageviews from our reports to leave meaningful data. Thankfully its very easy.
(more…)