My Journey to Wordpress - Part 3
Posted on January 1, 2008 at 6:56 pm By Ryan in Web DevelopmentSections…
I loved sections! Textpattern has it right using sections. For those of you that are wordpress junkies, let me explain… In textpattern, a section is almost like it’s own little site within your site. When done right, sections in textpattern allow you to separate and manage all of the different content areas in the website. Each section, is assigned a stylesheet and template. You can of course use one set of css and templates for all sections, but you don’t have to.
All of the posts to the CMS are assigned to sections. So, in my old textpattern install - I would have posted this into the articles section. The post would also get the textpattern and website categories. The cool thing with sections - you can separate your content - truly separate it.
For ryanbarr.com I had a few sections in my textpattern install. I won’t go through each of them but I’ll talk about three of them, and why I miss them dearly…
- Articles
- Trading
- Pictures
In my articles section, Megan and I put all of the “standard” fair content. Stuff about the family, any random thoughts etc… This was the area of the site that folks who know us and are interested in what we are doing could come to. On the navigation, we had a link to the Barr Family Blog and this was really just a link into the articles section.
The articles section of the site was setup without all of Ryan’s stock information. When a visitor clicked into the section homepage, the page was rendered using our standard theme, just without the business stuff. The same thing would happen when a visitor clicked into a posting in the section. However, the list of postings was also limited to the articles section! That means that folks interested in the family, but who don’t care about options aren’t stuck seeing all the posts I have about options etc…
The trading section was just the opposite. It was really my business, investing, options, iron condor playground. I put the papermoney trades in here, all of my random market commentary, and everything else to do with business in the trading section. Posts in here had the addition of stock quotes on the page, and targeted ads. it was pretty nice. I didn’t place ads or stock quotes in the articles section because they didn’t really fit.
Pictures, well it was just that pictures!
Certain sections were allowed to show on the homepage, and then once in the section you were really in a specific part of a total website. Quite nice really.
Wordpress does not do this
Or at least I haven’t yet figured out how to make wordpress do this without a ton of php hacking.
Making it work…
Since I decided to move to wordpress I had to make this work. In wordpress you have pages (static content), categories (posts), and tags (pages and posts) - alas, no sections.
Currently, ryanbarr.com is divided between really two, possibly three major topic areas. The family area, the business area and the pictures area. Taking pictures out to there own part of the site was a snap using the Gallery and wordpress setup that I have running here. Part one solved.
Breaking out family and business just didn’t seem possible. So for the site we’ve taken a little different approach. Rather than using a ton of categories as most blogs tend to do, ryanbarr.com will only have a few categories, and we will make judicious use of tags. Thankfully, wordpress now has native support for tags so that should help out a bit. A few pieces have been broken out into pages, that will also help as well.
The one thing with this setup that I’m not too happy about is the fact that wordpress doesn’t really support viewing posts by category. You have the archive pages, which I am using, but once in an article, the segregation goes away.
I’ve also lost the ability to really support the “two” major rss feeds I used to send. With the new setup, I can do rss feeds by category, author, tag etc.. however, I haven’t figured out how to send an rss feed for a group of categories. If I could set this up, that would be perfect. Until then, we’ve decided to just use the main rss feed only. It will muddle the content a little bit, but it’s not horrible.
I’m still looking for a way to fix this, so if you know of something - post a comment please!
Importing Data
Now that Meg and I have decided on an organizational strategy, it’s time to bulk load some testing data so that I can make sure everything is working correctly. Off to Manage -> Import…
First things first, the textpattern import into wordpress is broken. It doesn’t take categories in correctly. And please make sure that you change the name of your admin user before you do this import. Here are the things to watch out for…
- Categories do not import correctly. They show up in the list without any problem, but the association of post -> category somehow gets lost in the shuffle.
- When you import users, their password is reset. Make sure you rename the admin account in either textpattern or wordpress before running the import script. If you don’t you will be kicked out of the import and have to do a password reset… it is a pain.
- Posts (articles) are imported in plain text, ie: textile. If you don’t want to use textile in wordpress, this is a problem. You will lose all of your formatting.
- Wordpress doesn’t have sections, sections do not get imported. If you’ve used sections in textpattern they will be lost
To fix a couple of these annoying problems, I hacked my textpattern.php import file. I’ll post a copy of it on this post, just note that it doesn’t work perfectly - it was a hack for my use and I don’t plan to support it. Please use at your own risk. This script met my needs so I left it alone after that. Here are the things that I fixed/added.
- Added a Section import into the Categories import part of the script
- Added a button to skip the user import, you can still import users if you want
- Changed all of the posts to import the Body_html and Excerpt_html, that fixes the annoying little plain text thing
- Made the section a category for the post
The only thing that I can see that still doesn’t work is the normal category assignment. I looked at it, the code appeared to be correct, but still no dice. Since I decided to get rid of my textpattern categories and redo things with tags, this was okay with me and I didn’t bother to fix it.
I’ve got data!
So now I’ve got data! Everything in the development instance is running pretty well. I had to run the data import script a few times to get everything fixed, but after a bit of debugging we are good to go.
Now that I’ve got data… oh man, the site still needs work.
The vSlider3 theme is pretty cool, but it has a few goofy things that I wasn’t happy with. In the next post I’ll run through the things that I tweaked in the vSlider theme to adjust the way that Gallery 2 works, as well as some of the things in wordpress.
Oh yeah, here is the import script (from wordpress 2.3.1): download
Tags: mysql,textpattern,wordpress
Categories: Web Development



2 Responses to “My Journey to Wordpress - Part 3”
Arghh, one of the best articles why TXP is such a great Blog/CMS platform and you are switching to WordPress. Can’t believe it (Really!!!).
Seems like I have to read the two predecessor articles also
OK, sent the article to del.icio.us and my StumbleUpon blog BECAUSE of the great arguments for Textpattern.
And we are not even talking performance…
Thanks Markus, it was a difficult move more me. I really, really like textpattern. In fact, all of the other sites that I have for clients and personal use are all powered by textpattern.
From a performance perspective, the value of the wp-cache plugin cannot be understated… Anyhow, I guess it comes down to the best tool for the job. When I need customization and total control, textpattern is the way to go. Unfortunately, is just isn’t as “user friendly” as wordpress from a straight up blog perspective.
I’ve actually found over the past couple of weeks, that I really enjoy the wordpress framework. I think there are a lot of ways that it could really be improved upon - however it’s simplicity is part of the beauty.
Anyhow, I’m not abandoning txp forever - just on this site
Thanks for the comments by the way.
Care to comment?