technology, tips, wordpress

The Perils of Using a Free WordPress Theme

Take a look at what happened to this blog’s hit counts after switching (briefly) to a new and free WordPress theme downloaded from the official WordPress website.

Before I used my own variation of the freely available sandbox theme. I switched after updating the template andlosing some of my work on it. Now I’ve gone back with though I haven’t put any real effort into making the site look “good.”

Since replacing the theme, my site’s stats have returned to normal. I won’t name the theme that killed my blog’s stats for about a week, because that’s mean, but it should serve as a warning. By itself the sandbox theme is fairly SEO friendly, but with with a little tinkering you can get something that knocks the mittens off kittens. Sandbox is the exception though, not the rule. Many of the themes available out there a garbage. It is better to make your own or pay someone with brains to do it for you.

Remember, free is sometimes good, but not always.

design, wordpress

A Temporary Fix to Keep WordPress XHTML Friendly

Today I discovered two bugs in wordpress that keep it from being valid xhtml. They don’t happen in all occasion, but I was lucky enough to hit both with a project I was working on.

The first bug happens when you are using the links widget and have more than one category of links. What you get is multiple items marked with the same id. That is a no-no. Fortunately a kind person offered a fix right in the comments of the bug report.

Here’s a stupid simple fix. Add this right before the call to wp_list_bookmarks() in [widgets.php]:
$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);

The second bug is when the Archives widget is used and the “Display as a drop down” option is checked. The problem is that it uses “onChange” when it should use “onchange.” To fix this just do a search & replace in the widgets.php file.

I love WordPress, and I am glad that these fixes were easy, I hope that they (along with some of the other xhtml issues) get sorted out in the next release. If they don’t you’ll have to reapply these changes every update until they do.

code, technology, wordpress

Update to Picased the WordPress Picasa Widget

Picasaed has been updated to version 0.4

picasa web iconPicasaed works pretty much the same as the Flickr Widget, but doesn’t use tables, because no one likes tables. It is all sorts of XHTML friendly, if that’s what gets your motor running. It doesn’t do anything fancy, it just displays X number of photos from a specific album. If it doesn’t work tell me and I’ll try to fix it.

Version 0.4

  • Picasaed now uses the thumbnail image (faster loading!)
  • photo titles are used when present
  • photos now link to album
  • images have proper alt tag now
  • optimized code

Download PicasaedMore Info

code, technology, wordpress

XAlign, A TinyMCE Fix for WordPress

It’s bothered me that TinyMCE, WordPress’ default rich text editor, uses the align attribute. For example if you want to center some text and use TinyMCE you’ll get code that looks like this:

<p align=”center”>My centered text</p>

Why is that a problem? Here’s the list

  1. It is not valid strict xhtml
  2. It is deprecated transitional xhtml
  3. It does not function as expected across browsers in all cases

Anyone writing new code should aim to have valid strict xhtml. Why? Because strict code will offer a better experience for everyone across browsers, it will be easier to update, and it is more future-proof (though nothing is 100% future proof). Hopefully WordPress will come up with a built-in solution soon and render this plugin pointless, but until then this works.