Count Page Hits in WordPress

This is just a little snippet of code I wrote to count the number of hits on a specific page. I only wanted it to work on single post pages so I included the is_single() conditional tag. function count_page_hits() { if(is_single()) { global $post; $count = get_post_meta($post->ID, ‘count_page_hits’, true); $newcount = $count + 1; update_post_meta($post->ID, […]
HTML5 Search Form in WordPress

Some of you may or may not know that I have been working on an HTML5 WordPress framework that was just released called PressWork. We are still squashing some bugs for the official 1.0 release and one of the issues that came up was in regards to the default WordPress search box and making it […]
Run a Shortcode Anywhere in WordPress

WordPress shortcodes are macro codes that allow you to perform certain actions within the post content. By default they only display on single post pages within the post content. The most commonly used one is probably the gallery shortcode which looks like this: [gallery] Including that in your post content will display the post’s gallery […]
A Better Way to Remove Images from a WordPress Post

I had originally written about Removing Images from a WordPress Post quite a while ago, and while that snippet still works, I recently discovered another way to do it that might help some people. This way hooks into the content filter. If you include this in your functions.php it will remove every image from the […]
A Problem with the WP Plugin Directory

Some of you may not be aware of this, but there was a small security breach in the WordPress.org plugin directory this week. Someone managed to commit malicious changes to some popular plugins by hacking into the SVN repository. The WP crew discovered the changes and managed to revert the affected plugins back to the […]
Rewrite Search Result URL for WordPress

If you have ever done a search on a WordPress site you have probably noticed that the URL ends up looking something like this: https://your-site.com/?s=searchterm Even if you have set up your site to display pretty permalinks you will still get that “s” parameter in your URL. For some reason, WordPress does not rewrite the […]
WordPress Backup to Dropbox Plugin

Having a backup strategy is a definite must for any website, whether it’s for a small blog or a big commercial site. Think about the number of hours that you have put into your site, writing the content, tweaking the settings to your liking, and getting it to look just right. Then one day, you […]
Simple Pagination for WordPress

Most sites use some sort of pagination to allow you to navigate through to their older posts. If you install WordPress and use TwentyTen, you will see the “Older Post” link at the bottom of the index page. That’s pretty standard for some WordPress themes. There are a few plugins that made it easy to […]
Fluency Admin For WordPress

Today I’m going to talk about one of my very favorite plugins, Fluency Admin. A couple of years ago, I came across a competition to tweak the design of the WordPress administration pages. I have a few pet peeves about it myself: Grey, grey and more grey; too much grey everywhere (on a default install) The […]
Three Slideshows for Arturo

When I recently released version 1.0.1 of Arturo, I added a slideshow function that allows you to display featured posts at the top of your home page. There are no theme options available for the slideshow because I wanted to use it as a way to get users familiar with the Custom Actions editor. Here […]