Ultimate Tag Warrior Plays Havoc on Search

Long story short, I ran into some search problems with WordPress and the cause was Ultimate Tag Warrior.

I’ve recently been trying out a few tagging plugins to get the site a little better organized and I eventually settled on the always-popular Ultimate Tag Warrior. Obviously since I activated UTW after several hundred posts were already in the bag, only a few of the more recent posts were actually tagged. Keep that in mind.

I was testing the archives layout for the new site and decided to have a quick go at the search to see if that was displaying the older and newer posts links properly. I did a search for ‘wordpress’ which is pretty prevalent through my posts. That’s weird, it told me no posts were found… Thinking this was the result of a poor search algorithm built into WordPress 2.1, I searched around for a few plugins. None of them helped. I was completely stumped. Off to Google.

After searching for things like ‘wordpress search broken’, ‘wordpress search not searching all posts’, and so forth, I found an interesting discussion about the most recent version of Ultimate Tag Warrior. Basically the problem is that the plugin is causing search to only occur through the posts with tags. Since only the more recent posts had tags, I was getting only a few search results.

If anyone’s having the same sort of problems, just comment out the following two lines in ultimate-tag-warrior-actions.php. They should be around line 894:

add_filter('posts_join', array('UltimateTagWarriorActions','ultimate_search_join'));
add_filter('posts_where', array('UltimateTagWarriorActions','ultimate_search_where'));

Hopefully that’ll help anyone who’s experiencing the same symptoms.


One Reply to “Ultimate Tag Warrior Plays Havoc on Search”

Leave a Reply

Your email address will not be published. Required fields are marked *