Nuts! The URL I’ve been using for our remodeling project was broken by the recent WordPress upgrade. (Well, technically it was the old tagging system that broke.) So I’ve temporarily changed the remodel URL to point to all blog posts. Once I get tagging fixed, I’ll change it back.
Tag Archive for 'wordpress'
Remodel URL broken
WordPress upgrade
My web host, pair networks, is upgrading my server tomorrow, so it looks like a good time for me to upgrade WordPress. Hopefully I’ll be posting a comment on this article in a few moments saying how easy everything went…

Joseph wrote an interesting post on the futility of rel=nofollow for blogs. Apparently he is not alone–there’s an anti-nofollow organization, NoNoFollow.net, that lists several valid objections to this technique. They also list a few plugins for WordPress which are supposed to disable the rel=nofollow “features”, but according to conversations with Joseph none of these are 100% effective. So I have followed his lead and manually edited my WordPress 1.5.2 code to remove the nofollow bits. I also added a
badge on the left column of my blog.
I’m in the process of re-working my wife’s quilting website. (It’s so pathetic right now that I’m ashamed to link to it.) I originally hand-rolled some PHP and CSS for her. It got the job done, sort of, but I’ve never been very happy with it. After using WordPress here, I got the idea that it would do a much better job than my own pitiful code. So here’s how I set up WP as a content management system (rather than a blog server) for my wife’s site. This is my third WP install, and I’ve learned a few things from the first two iterations. I even managed to document my second installation which has been helpful this time, so I’m documenting even more thoroughly this time around. Continue reading ‘New website for my wife’s business’
I stopped by Joseph’s blog a few days ago and read the article about Vint Cerf moving to Google. This got me thinking about an earlier Google-related post about sitemaps on Joseph’s blog, where he wondered about a WordPress plugin to generate Google sitemaps. I figured that the WordPress community had probably finished with this by now, and it seems that they have. This article discusses the development of several such plugins and their features. If you check this link, you can peruse a menu of sitemap plugins.
I chose Arne Brachhold’s sitemap generator plugin. As usual with WordPress, installation was simple. I had two minor problems (see below), both covered by the FAQ section on the sitemap plugin page.
I downloaded the plugin to my WordPress’ wp-content/plugins directory, then activated it from the Plugins admin page, http://your.blog/url/wp-admin/plugins.php. Next I went to Options/Sitemap and adjusted the options to suit my blog, then clicked “Rebuild Sitemap” and ran into problem #1–I had forgotten to make sitemap.xml and sitemap.xml.gz writable. Easy to fix, see the FAQ section on the sitemap plugin page. Once I took care of this, I successfully built my first sitemap file, but got a “Could not ping to Google” error, also addressed in the FAQ section (although not in the plugin sourcefile). I clicked on the URL after the “Could not ping to Google” error, which basically told me that I needed a Google account. (Yet another password to keep track of, sigh…) So, create Google account, wait for email address verification, then manually cut-and-paste the sitemap URL into the Google account manager. Am I finished yet? No! Google now wants me to prove that I have access to the sitemap’s directory by creating a particular Google-supplied filename. I’m starting to wonder if Google sitemaps are worth the hassle, but I’ve come this far and hopefully this is the final step. touch GOOGLE0123456789abcdef.html, click “Verify” on the Google’s “My Sitemaps” page, and a nice green VERIFIED message comes up. Then I went back to my WordPress Options/Sitemap page and tried “Rebuild Sitemap”:
Successfully pinged Google at http://www.google.com/webmasters/sitemaps/ping?sitemap=http://my.blog/url/sitemap.xml.gz
Woo hoo, success! I’d better alert my web hosting company so that they aren’t blindsided by the sudden bandwidth spike.
I finally got around to upgrading my WordPress blog software to version 1.5.2 today. I also took this opportunity to apply Kimmo’s entity patch, which takes care of HTML entities ½ and ¾, and probably some others as well. At least I remembered to reapply the tags patch this time!
Applying these patches got me thinking about folks that aren’t “patch-aware”, i.e. don’t know how to apply patches. It’s almost trivially simple. On a Unix (or Unix-like) system, the command is:
patch original-file patch-file
where patch-file is the name of the file containing the patch(es), while original-file is the file that you are going to fix. This works fine as long as only one file is affected, as is the case with Kimmo’s patch. You can tell this by reading the patch file and looking for long lines of punctuation such as
***************
or
===================================================================
If you see more than one of these lines, there are multiple files affected. Such is the case with Felix Wong’s tags patch. For this one, the command is:
patch -p1 <patch-file
which should be executed from your wordpress directory. Explaining this command requires knowledge of directories/file structures, which I don’t want to cover right now.
A few days ago, Joseph and I were talking about bolting statcounter onto our blogs. He’s the one that pointed out statcounter to me, and all he needed to do was add the statcounter script to his theme’s footer.php file. This would probably work for any single-theme site, but I’m still running multiple themes on my blog. I need to do one of the following if I want to use statcounter:
- Drop all but one theme. There are several good reasons for this, most important of which is maintenance. This would allow me to add the statcounter script to the remaining theme’s footer.php and I’d be done.
- Add statcounter to all my themes. This probably wouldn’t be too bad, except for maintenance–whenever a new version of one of my themes came out, I’d have to manually reapply my changes.
- Write a plugin to insert the statcounter script in the footer of every page. This would be the most work up front, but it would give me a good excuse to learn how to write plugins for WordPress.
I found some useful resources for plugin authoring. The WordPress codex has a section on writing plugins. Owen’s tutorial is a great introduction–just read it and start hacking!
Carthik’s Plunge into Plugins article has lots of good advice, but isn’t a tutorial–check it out after/while you get started with Owen’s page. More good info is available on the Codex page Writing a Plugin.
I’ve started working on this plugin, and I’ve already been bitten by the “extra blank line” problem. (Admin interface was reporting “Cannot modify header information - headers already sent by…” error. Note to self–scroll to the bottom of each PHP file, and make sure the PHP close tag is right at the bottom of the file.) I have the code to insert arbitrary text into the footer, but I still need to add the Options menu which would allow J. Random User to edit the text to be inserted. (Right now, the text is hard-coded in the “plugin”, which I have installed and activated on this blog. Check the bottom left corner of any blog page for the statcounter.)
I don’t see any reason for this plugin to be statcounter-specific. It would be more useful to provide some sort of generic footer plugin which would allow HTML or javascript to be inserted in the footer. We’ll see how it goes. If I’m happy with it by the end of the night or later this week, I will go ahead and release it.
Spam Karma 2 rocks! Have I said that already? Well, not in so few words…
But I just noticed something. I wrote a post last night with multiple references to my own blog–in this case, I refered to two other posts. The first reference correctly generated a pingback, but the second reference doesn’t seem to have been handled. SK2 didn’t log it as spam or a valid comment, and there is no pingback comment in the second post that I linked to. I’m going to disable SK2 for a minute while I post this article, to see if both pingbacks are done correctly, then I’ll contact dr Dave and let him know what I’ve found.
Sacramento boardgaming
Nicholas is setting up a new boardgames site for Sacramento-area gamers. (I’m kibbitzing providing helpful advice.) The new site will be based on WordPress, of course. This whole thing was brought about by Meetup’s recent decision to start charging fees for their groups.
As soon as the site is ready, we’ll be promoting it on the Sacramento Boardgames Meetup, where I’m the so-called “Organizer”. (People who know me well may commence laughing now.)
I’m thinking about using the free statcounter service on my site, but it requires that I add a little bit of javascript to each page. If I was running a single theme, I could probably find all the appropriate </body> tags and just paste in the statcounter code. But I’m trying to support multiple themes; besides, where’s the fun in cutting and pasting a bunch of code? Also, what if I need to change the statcounter code for some reason? So I think the Right Thing to do here is come up with a plugin for the wp_footer action which will insert some user-specified code, (in this case, my statcounter javascript). I haven’t found a plugin for statcounter, so I’ll be searching for a generic footer plugin. If I can’t find anything, I guess I’ll have to roll my own.
