:: Archive for the 'WordPress' Category ::

Upgraded to WordPress 2.0

Posted on December 30th, 2005 in PHP, Site Updates, WordPress by Greg

I just upgraded this site from WordPress 1.5.2 to WordPress 2.0 – it was a very simple process and it looks like they’ve done a great job in keeping backward compatibility.  All my plugins and my custom theme worked (seemingly) perfectly without any modifications.  The whole process took about 10 minutes (including uploading the new files).  The site shouldn’t look different at all, but the admin is a lot nicer – you can check out the new features if you’re interested…
Let me know if anything seems to not quite work.


Posted WordPress Subpages Plugin

Posted on September 22nd, 2005 in PHP, Web Development, WordPress by Greg

I’ve posted the simple WordPress pluggin that I mentioned months ago that shows subpages for the WordPress ‘Pages’ feature. A couple people had asked for it, so now you can download it at the following location:

http://www.gregphoto.net/download/subpages.zip

WordPress – the great and the not so great

Posted on April 14th, 2005 in PHP, WordPress by Greg

When I first stumbled across WordPress (which I’m using to power my website), I was very pleasantly surprised by the excellent administration environment, and just how easy it was to setup and use. Before I even decided what tool I was going to use for my website, I had come up with a basic design and color scheme that I was going to use. I managed to stay pretty close to what I wanted, but there were several things that made it a bit trickier than expected.

In order to get my custom ‘skin’ for WordPress I needed to create a theme – this is pretty easy as a theme is really only composed of a few pages. The template tags used to create a theme are relatively straightforward and I was able to get something up and running very quickly. The difficulty is that the template tags are aimed at very novice users, which means that they hide a lot of complexity. And while hiding complexity is often great, it also means added complexity when you try to do something that is a little outside of the feature set.

For example, WordPress has a feature called ‘Pages’ where you can create regular posts that act more like static pages and aren’t blog-like. In addition to not sitting within the standard blog flow, pages can have child pages so you can build a hierarchy of pages. An example of ‘Pages’ on my site is the ‘About‘ page you can see linked on the left. If I wanted to I could write a sub-page called About Me with sub-pages for My Education, My Resume, and My Hobbies. Now I don’t really have anything on this page, so I guess I’m giving a bad example – but you’re smart, you can imagine it.

While it was possible to create a hierarchy of pages, the only place to show it was really in the navigation bar on the left. Obviously this isn’t acceptable if you have several levels of nesting – the left column isn’t big enough. You can limit the ‘depth’ of the tree, but then the lower levels aren’t shown anywhere, and a page that no one can get to just isn’t too useful. I wanted two additional things:

  1. To show a breadcrumb under the page name which would have links to all of the parent pages
  2. To show a list of child pages

I understand that Pages were only introduced in the current release of WordPress, but these seem like two very obvious requests. The unfortunate thing with doing these is that the API provided by WordPress is so targetted at its own templating that it requires a developer to talk directly to the database to get data. Most of the template tags return data with HTML embedded, so if you want to use the data for another purpose they become useless. Using the WordPress plugin functionality I was able to write a class which augmented the standard Pages feature set with some useful functions.

I understand that the template functions return HTML to simplify things for the user, but it would be great if there were some lower-level functions which returned information as data (i.e. returning an array of child pages) so that the user can choose what to do with them. So while it might be easier to write:

1
get_child_pages($id)

I would personally rather write:

1
2
3
4
$children = $page->getChildren();
foreach ($children as $child) {
      //  do something
}

I think that this actually ends up being more readable because it’s not as spooky – you can see exactly how the data is being rendered on the page, and if you need to make a change to it you can do it write on the template instead of changing the source code of the API.

But….overall I’m very happy with using WordPress and how flexible the system is. I wish the team continued success with the project!

New Site Design

Posted on April 12th, 2005 in Site Updates, WordPress by Greg

After a couple years with the same front page for my website I got a little bored with it…so I decided to switch it up a little bit and change around the format of my site. I thought it might be fun to do a bit of writing on the site, so I did some quick searching for a ‘blog’ or ‘content management’ solution and my final choice was WordPress.

I threw together a quick WordPress theme, augmented the “pages” feature with some missing functionality via a plugin, and ftp’d the thing up. Pretty easy. More details later on my thoughts about WordPress, it’s themes, and ease of use.

I’m hoping to put a wide variety of writing up here…as an outlet for my tech dorkiness, musical thoughts, ramblings, photography, and other things that no one will read. If a real person is actually reading this – add a comment and say hi.

Hope to write soon.

– Greg