posted on Monday May 19, 2008 - 10:39 pm (4 months, 3 weeks ago)
tags , , , ,
I’ve spent much of this evening fighting, cajoling Wordpress into doing my bidding. I wanted my Twitter posts to appear inline with my blog posts but had not been able to make this happen until tonight.

The reason I had trouble is because the way Wordpress is designed is — in places — extremely limiting. While you’re in the middle of the main “blog post” loop, you can’t use the same infrastructure created to go off on a tangent. No, instead you have two choices, write your own database API (with the possibility of breaking things later), or put data you want to retrieve later into a large and cumbersome array.

I chose the latter. Before the blog posts are loaded, I load all (yes, all)the Twitters into an array. As I pass through the blog posts I check through the Twitter array for Twitters around the same time and output them if relevant. I’ve added a few ways to jump over already-output Twitters and stop if we’re at the last post in a page, but it’s still unwieldy and annoying.  Stupidly, categories and tags seem to be stored in the database in almost the same manner.  This is good if you want them interchangeable — which I don’t; I want categories as categories (think of libraries with their books on certain shelves) and tags as keywords which relate to the content of the post.  It doesn’t seem to work like this (at least internally) and if it does I couldn’t find any good documentation on it in my meagre searching.

Even worse, Wordpress uses a bunch of really common-sounding variables ($post, $query_string) without much documentation on these reserved variables. Now, Wordpress is great if you’re not a tinkerer, which I guess makes me not the regular target user. Still, the more I delve the more frustrating it gets. I changed for interoperability and I got it, just at the expense of hyper-customisation.

On the plus side, I’ve now been able to integrate the Twitters inline with the posts just how I wanted it. I could have had a summary each day using the Twitter plugin I’m using, but I wanted the Twitters running throughout the posts. In addition, they don’t show up on pages 2 and beyond, and aren’t in the sidebar. I like to think of Twitters as non-historic bits of information.

Even though I’m glad I got it all up and running (after three separate attempts using three different approaches over two separate days) I’m not so sure this is how I want to keep it. I’ll be keeping an eye on others using the summaries and a couple of other sites using a similar approach to me and make my decision later. If I post more regularly I think the way it is will be best… but that means I have to post!

Related Posts:

One Response to “Wordpress: Thoughts”


    I agree. I think wordpress is a blog-o-matic. I always run into trouble getting it to do what I want.

    Chris Annable's gravatar Chris Annable on May 20th, 2008 at 6:11 pm

Leave a Reply

bludger.org (version 9) © 2000-2008 bludger.org. All rights reserved.
Not many animals were harmed in the making of bludger.org, but a lot were eaten. And they were delicious.
I mean, really, really nice. I especially liked the squab, he didn't put up a fight.