Skip to content

Item Tooltips in WordPress Revisited

Note: Unless you are a WordPress user or a web programmer geek, this post will probably be very boring to you.

If you’ve been using an installed version of WordPress for your blog, you’ve probably noticed the little bar just under your admin menu to update to the latest verison 2.3.2. Apparently there’s some security fixes in there including the fix for a hack that allowed anyone to see your draft posts. Frankly, I wasn’t too worried about people seeing my draft posts (not like I have any national secrets or anything) but that little bar was bugging me because I’m almost OCD about keeping my software and stuff up-to-date.

Only doing this wasn’t simple for me because apparently the WordPress scripts were using a little too much memory and I kept getting Allowed Memory Size Exhausted Error. In frustration, I downgraded and upgraded two more times, only to get the same result. I was about to write a email to my webhost when I happened to check their support database and lo and behold, there was my answer! I created a custom php.ini file, placed it in the subdirectory that is this blog and bing! Everything knows works perfectly. Did I mention that I love my webhost? Buy your hosting from her, she’s a super nice lady and has the cheapest prices you will ever see, I swear.

So, enough about that and onto a related topic that I’ve been meaning to cover for a while. Before, I wasn’t able to get ItemStats working on this blog so I had come up with a custom solution that was a little bit…complicated. I actually ended up getting ItemStats to work but I was having problems with it dealing with the permalinks and I don’t even think the entire script is supported anymore…

Then Thottbot, quickly followed by WoWHead, came up with their own handy solutions in the form of a JavaScript that you just link to. Seriously, that was it. So, this is my little tutorial of how to implement it in a WordPress blog:

Step 1: Get the code from either Thottbot or WoWHead. It’s your own personal preference as to which one you want but I personally prefer WoWHead. Their tooltips just seem prettier and quicker. It’s what I use anyways.

Step 2: Open the theme file to edit it. They say anywhere will do but knowing my code, I think the best place is just under the </head> tag. To get to that, log into your admin panel for your blog, then the Presentation link in your menu, then Theme Editor in the submenu that will load with the page. There should be a menu on the right side of the screen and you’ll want to select the Header file to edit.

Just note that the changes you will make will only affect the current theme. If you change your theme, you’ll have to go through these steps once again.

Step 3: Place the code into the Header file. Scroll down through the code and look for the </head> text. You can use the Find command (under the Edit menu) of your browser if you wish. Once you find the </head> text, place the code that you got from Thottbot or WoWHead under it on another line.

Step 4: Click the Update File button on the lower right and…you’re done. To get the tooltips to show up in your posts, you must first find the items by searching Thottbot/WoWHead for them. Once you’re on the item’s page, copy the URL that’s in the address bar of your browser, and link whatever text you want to it in your WordPress post writer thingy.

I hope that was fairly simple to understand. I could also post an optional addition to this tutorial of how to use the macro expander plugin that I talked about in my first tooltip tutorial. But I’ll leave that up to you, the readers, to see if you want it. If you do, just post a comment below asking for it and you shall receive.

One Comment

  1. Posted September 22, 2008 at 6:06 pm | Permalink

    thanks for this guide!

    Googled it and found your page.