plugins wordpress

Search Exclude HTML Tags WordPress Plugin

One of my clients, Jonathan at FinePrint, emailed me last week about the search function of his WordPress-based site being broken. He noted that searching for the keyword “title” on his support forum was returning almost everything. After a few tests on his site and some others, I realized that the search for “title” was actually returning all posts with images because of the title attribute in the image tags. So the real issue was that the WordPress built-in search considers HTML tags in post content to be searchable content… and that this meant that all WordPress sites were similarly “broken”.

I ended up implementing a fix for FinePrint by employing a MySQL function fnStripTags (found all over the internet and attributed to Robert Davis) to strip the HTML tags, and telling WordPress to use it by hooking into the posts_search filter.

From what I’ve been able to find, this “bug” has been around for years so perhaps it’s simply not an issue that people really care about or they just consider it intended functionality. Although I’m actually surprised to find very little in the way of complaints… or maybe I haven’t looked hard enough. Anyway, since it makes a lot more sense to me that HTML tags be stripped, I’ve taken the time to bundle this fix up into a plugin and get it onto To apply on your site, just download, install, and activate!

Download the plugin “Search Exclude HTML Tags” from

plugins wordpress

Sticky Custom Post Types WordPress Plugin

I needed sticky custom post types for a client project but found out that WordPress doesn’t support this out of the box. Luckily it turned out to be pretty simple to add in that functionality with just a little bit of code… which I have turned into a plugin for everyone to use! YAY!


1. Download the plugin from

2. Upload sticky-custom-post-types.php to the /wp-content/plugins/ directory.

3. Select custom post types you want to enable with the sticky function on the ‘Settings → Reading’ page. Unless you’re using custom queries to display your sticky posts, you probably also want to check the option to display selected post types on the blog home.

4. When adding/editing a custom post type, check the “Stick this to the front page” checkbox if you want to stick that custom post to the front page.

And that’s it!

Unfortunately there’s no way to put the “Stick this…” checkbox in the same place as it is on the built-in “Posts” add/edit page (to do so would require modifying core code), but I think that having it display immediately is actually a lot more straightforward than having to click through the visibility setting edit link to get to it.

plugins wordpress www

How to remove the Media Library tab in the WordPress media uploader

By default, WordPress allows a user with the “upload_files” capability to view all items in the media library. Here’s how to remove the Media Library tab in the WordPress media uploader completely (e.g. for contributors without the “edit_others_posts” capability).

Copy and paste the following code into a plugin or the theme functions.php file:

function remove_medialibrary_tab($tabs) {
return $tabs;

plugins wordpress

WordPress Automatic Links plugin

Here’s a super simple WordPress plugin that automatically adds HTML anchor tags to plain text links and email addresses embedded in the content of posts and pages (WordPress already does this by default for comments). It also gives you the option to set the nofollow attribute value on all automatically generated hyperlinks.

Download this plugin at

diary plugins wordpress www

WordPress 2.6 / 2.7 + bbPress 0.9 cookie integration plugin

This plugin is for WordPress 2.6 or 2.7. It enables WordPress to generate cookies that work with bbPress 0.9 so that single sign-on can be accomplished between the two. Follow the usual integration instructions and enable this plugin in your WordPress installation. I also advise clearing your cookies.

The integration is all up and running on my site at I’d like to add that I was able to put the plugin together without writing a single line of code! It’s literally all the necessary functions cut and pasted directly from WordPress 2.5.1 pluggable.php, so kudos to WordPress for making it easy!

Download this plugin at

When you do cookie integration please keep in mind that there are some login hooks in pluggable that might not be called in either WP or bbPress depending on which side your user logged in from. This might affect the functionality of some plugins.

For example, after rerouting all my bbPress logins to WP I realized that the ‘bb_set_current_user’ action hook on a bbPress plugin I used was no longer being called, so I had to incorporate it in on the WP side using the ‘set_current_user’ hook.

bbPress 1.0 users should use this plugin instead.

diary plugins wordpress www

WordPress Plugin: Separate Feed Comments and Trackbacks

I couldn’t find anything out there that separated comments and trackbacks from the sitewide and post comments feeds in WordPress, so I had to take a peek at the source to figure this one out. Luckily there’s an (undocumented) hook “comment_feed_where” that makes it easy! Woo!

Anyway, here’s the plugin in case anyone else might be interested…

Download this plugin at