On The Bleeding Edge
I have recently been keeping revisions of my shoddy coding practices with Subversion, which I ignored until I picked up a “Practical Subversion” book a few weeks ago. Naturally, I figured it only logical to expand this to my own WordPress installation, making WordPress updates as simple as a single SVN command. That’s all kittens and daisies, but for some reason I thought it would be cool to update to trunk - the bleeding edge of typically unstable code.
Of course, I knew what I was getting into and wanted to try it out - WordPress 2.3-alpha (trunk as of now) has native support for tags. I have always had an issue with categorizing posts on this blog. I didn’t want to have too many categories but then when I started having 50+ posts about Google or Apple, I felt those categories were necessary. Then there were the many posts which I had a hard time categorizing accurately. Now running WP2.3-alpha, I converted all of my categories into tags and will only use tags from now on.
As such, I ran around and changed this theme to support tags through the use of such handy WP template tags as wp_tag_cloud() and the_tags(). However, there are still a few issues: getting wp_tag_cloud to exclude a particular tag (such as ‘uncategorized’) and getting tag pages to actually say the name of the tag in the page title. (Update: I got tag pages to display the tag name with echo get_query_var(’tag’);.)
I guess the point of the post was, if you see anything funky around here, please drop me a line just in case I don’t already know about it. As they say, when in Rome do as the Romans do and run trunk on a production site.



hey paul, i just wanted to know if the new tagging engine works fine with UTW..
I don’t use UTW, but when 2.3 is officially released (9/20), there will be a utility to import tags from UTW to WP.
“No one has saved this post on del.icio.us. Why not bookmark it too?”
;-)
Peace
-stephan
Another reason I’m glad I use Textpattern ;)
kittens and daises?
I’ve come to the same conclusion you have, Paul. Tagging makes more sense to me than categories.
Something to look out for, Paul, is whether the tagging is going to screw with any of your previous categories, especially as regards search-ability. I tinkered with 2.3 alpha sometime back and was frustrated that that it clobbered some of my earlier categories, but the bugs have probably been worked out of it now. I am sensitive to this because I recently changed site designs (for about the fourth time, which is a no-no), and am having 404’s as a result: one of the old themes handled categories with URL/category/page/ instead of the way the current one does, with URL/category/ so the search engines are seeing a lot of 404’s as a result of this. You might want to install Alex King’s 404 plugin to see if 2.3 does anything funny to you in this regard … it probably won’t, but I have been amazed how relatively simple changes can have unintended consequences.
Given Wordpress’s ability to add categories on the fly through the editor, I don’t see why they are less favorable than tags? There’s a category cloud plugin that does the same thing as a tag cloud, which fills that requirement. So what am I missing?
During the interim while I consider switching to another platform like Expression Engine, I can confirm that I too hate the wordpress category system. I deployed UTW a while ago and never looked back, especially since the use of tags significantly helped (me) in technorati hits and over all search engine goodness.
As it stands, I still use categories to divide my personal site (Journal and Portfolio) and thats it. It lets me have a clearly subdivided site, although with something like EE, I could just create seperate weblogs. This speaks to me because I don’t want my journal tag searches culling from the portfolio tag database.
I really despise the way that WP made blogroll a category, and made it a default. Blogroll is simply something I’ve never used, and having to see it in the categories page makes me angry.
Hey, you stole my idea! Jerk! =p
Anyways… I’ve been totally lazy about actually doing something with the tags on my blog. I’ve been “planning” to replace categories with tags for some time now, but never got around to it. Let me know how things go.
Re: wp_tag_cloud() — the function is defined in wp-includes/category-template.php and it takes an argument just like get_posts(), and a lot of other wp functions… there are two arguments in the default array of args called “exclude” and “include”. Didn’t verify this, but from my experience playing with WP I’d imagine “exclude” is a comma separated list of tags you want excluded. So try something like wp_tag_cloud(array(”exclude” => “Uncategorized,other,stuff,you,want,excluded”)); There’s also a wp_tag_cloud filter you can hook into if you want to modify stuff.
@Mike, yeah I have been searching that file for ways to implement it - I tried just doing wp_tag_cloud(’exclude=uncategorized’) or the ID of that, but I haven’t tried an array.
dude you totally stole his idea…you’re just as bad as alex
haha, shouldn’t you be at work nabil?
p.s. can i have a stammy point?
paul - i don’t quite understand how tags will work (practically
speaking) any different then categories? I guess I just use one or
two categories and leave it at that, wouldn’t tagging more also lend
itself towards bulking and useless text such as many of the delicious
tag clouds (that exceed 50-100 tags) we see on blogs. I know there are
some hardcore UTW users out there but I just never use that stuff when
I visit someone’s site. Is there some functionality or purpose I am
missing? Can you shed some light (or sugar) on the situation?
@cwd - tagging is better in this case for me because I just type in all the relevant tags rather than being restricted to the categories I already had made, even though you can make new cats, it is far easier to just tag quickly. There would be more fluff in terms of tags vs cats, but I would be tagging more relevant things. not sure if that makes sense, but to me the solution was obvious.
Paul, you should take a look at Capistrano for deploying changes to your production server. It’s mainly used for Rails apps, but you can use it for any other type of app as well.
Basically instead of having to push your change to your svn repo, and then logging into your server to run the svn update, you just run a single command from your local machine that will push the changes to the repo and the run the update on the production server automatically. It can do lots of other stuff do. You write “recipes” for it to tell it what to do.
hi stammy,
i want to know if you are running 2.3 ? . I just upgraded by svn and it still says 2.2 . Is there any way i could upgrade to 2.3 (alpha) .
thanks
@taggy you probably SVN upgraded to tag/2.2.2, wp 2.3 alpha is on /trunk.
yes i just did from trunk and got the 2.3 alpha running but i get a mysql error in my wp-admin
WordPress database error: [Duplicate column name 'comment_subscribe']
ALTER TABLE wp_comments ADD COLUMN comment_subscribe enum(’Y',’N') NOT NULL default ‘N’
i tried repairing the tables but still didnt get any better,can you suggest something here ?
oh heh, I should have told you to watch out for r5858:
http://twitter.com/Stammy/statuses/197391912
I had that same problem earlier tonight. Try this:
yeah worked :-) thanks stammy ! btw sudo doesn’t work for me :p iam still on gs .
thanks a lot
i did the svn co wp-db.php
now i have this :(
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND post_author != '2' ORDER BY post_modified ASC' at line 1]
SELECT ID, post_title, post_author FROM wp_posts WHERE post_type = ‘post’ AND post_status = ‘pending’ AND post_author IN () AND post_author != ‘2′ ORDER BY post_modified ASC
can you help me out again ?
Paul,
Do these tags wind up in your permalinks, like categories do?
I might want to go to 2.3 alpha myself, but I would be reluctant to do so if the tags wind up in the permalinks: if they do and I decided to go back to 2.2.2, then I would have 404’s for all the tag-related permalinks that get cached.
Thoughts?
@Bruce - do you mean like http://paulstamatiou.com/tags/web-dev/? Since I converted all of my categories to tags, I redirected them with .htaccess so the search engines wouldn’t see 404s.
I would not recommend upgrading just yet. I had a big issue with last night’s release and it is buggy that’s for sure. The WordPress bug tracker for trunk has over 300 open tickets, so.. yeah.
Thanks, Paul. Sounds like I should hold off on 2.3alpha
Thanks for the Rewrite Rule, as well. I’ll save it for when there is a 2.3 that we all “have to” go to. I am slow on learning Apache and rewrite rules can be tricky.
Thanks Paul, I think I see what you mean now. I look forward to the WP upgrade.
Paul,
I realize it has only been a couple of weeks, but have you seen any benefit in going to tags? Any traffic improvements, for example, that you could attribute to tagging?
I saw your questions on the wp-testers mailing list, and I wanted to give you a heads up. I don’t know how frequently you update through SVN, but this weekend there have been some good bug fixes for 2.3’s new tagging feature. The issue where the tag displayed the tag slug instead of the tag name has been fixed. Also, using single_tag_title seems to work when getting tag titles outside of the loop, as opposed to using the get_query_var approach. But, hey, if it ain’t broke, don’t fix it. Hope this helps. Example code below.
<?php if( is_tag() ) { ?>
<h2>Posts Tagged ‘<?php single_tag_title(); } ?>’</h2>
thanks for the 411 Brandon. I haven’t SVN-updated in a while. Since 2.3 comes around in about a month, I might as well just wait for the final since the revision I’m on now seems to be stable.