Wordpress 2.1 Database and Function Changes
This site runs on the blog publishing system called Wordpress. It is completely free and you can either download the version for your website from Wordpress.org or go to Wordpress.com and have them host the blog for you (like Blogger does–but I’d recommend Wordpress instead).
If you use the version of Wordpress you install yourself, then you are probably accustomed to upgrading it every now and then. It usually does not change your site in any way, and adds some new features. Upon upgrading this time, I ran into two problems. The page links on my top menu were gone and my links on the sidebar were not showing up. Why? Well, Wordpress changed some things in the database.
In the wp_posts table, the post_status field can no longer be used to determine whether a post is a page, or a regular post (via the “static” and “publish” values). Instead, you should use the post_type field. I had to modify the theme I was using, and my top navigation was back to normal.
Regarding my sidebar, wp_get_links() has been changed. To display the links correctly on the sidebar, I had to use wp_list_bookmarks(). It took me a few minutes to customize its output to my liking, but it reduced my sidebar code by about 5 lines.
Overall, Wordpress 2.1 is great and I love the auto-save feature. It is a good upgrade, just be wary of your code!



No Comments Yet