10 Things You Need to Know About WordPress 2.0


If you’ve been seriously blogging for any bit of time at all, you’ve heard of the juggernaut that is WordPress. WordPress, of course, is the most popular self-hosted blogging platform utilized by independent writers. The official launch of WordPress 2.0 is upon us and, no doubt, the blogosphere will be buzzing about its launch. As a tester of the product since the early days of the WordPress 2.0 alpha builds, I’ve watched, participated and even assisted in the development of this software.

While this entry might get a bit technical, it is only because thecoolest new features are under the hood. For new users who don’t feel like tinkering with code and expect a shiny new piece of software out of the box, fear not… you will not be disappointed. The software provides a much more interactive and user-friendly interface. And for those of you who love the color blue, you’re going to love the new admin panel!

However, if you want to get into the real glorious nitty gritty of what you can do, then read on!

Here are ten things you may or may not know that can be extremely beneficial to know about WordPress 2.0….

 

  1. Thumbnails of Downloaded Themes – In the past, whenever you’ve gone and looked for a shiny new theme for your WordPress blog, you might have had the luck of seeing the theme in action. However, I can’t be the only one who has looked at a theme created 6 months earlier and wondered what it looked like on a blog because the author had changed it since publishing. With WordPress 2.0, theme authors are being encouraged to include a screenshot, entitled screenshot.png, in the theme folder. By doing so, the thumbnail will be loaded for the blogger to see in his theme list prior to enabling!

 

  1. Capabilities and Roles – In previous versions of WordPress, users could be given ‘limited’ permissions by assigning user levels. User levels, in the past, have relied on a scale 0 to 10, with 10 having unlimited administrative permissions. Various levels in between allowed ‘guest’ bloggers or contributors to have appropriate rights on your blog. In WordPress 2.0, this has been completely revamped. Without going into a lot of repetitive details on the nature of the various capabilities (Ryan explains capabilities and roles in great detail), the new features open up a whole new avenue of flexibility for plugin authors.For instance, there is an API function called 
    1
    current_user_can()

    , which allows the plugin author to match a currently logged in user against a list of capabilities. These capabilities range from ‘moderate_comments’ to ‘publish_posts’. Ryan’s article has the entire list, but it can also be found at the bottom of the wp-admin/upgrade-schema.php file.

  2. Importing from Other Blogging Platforms – As WordPress becomes an even bigger entity with a higher profile, it’s likely more defectors will want to migrate their existing Blogger, Moveable Type or other style blog to WordPress. I certainly wouldn’t blame them. Old-style import scripts that were included with WordPress have been scrapped for a couple reasons. For one, the other platforms have changed over time and the importers no longer work or the changes to WordPress over time have required a new approach to getting user data into WordPress accurately and effectively. There’s also the little detail of shoddy or incomplete code.

I, along with others, have taken to creating easy upgrade paths for folks coming from Textpattern, Blogger and Moveable Type. If you’re not on one of these platforms, but still want to come over to WordPress, the core software also permits import from an RSS feed!

As a bonus, for readers who have been monitoring the merger of b5media and About Weblogs , you might be interested to know that the tool of choice is a custom Nucleus CMS importer that ultimately will be submitted to the WordPress core code. But that won’t make this release!

  1. Built In Caching – Caching is the idea of storing files for quicker page load time. The concept as a whole is not new. Browsers cache all the time. Internet Explorer uses Temporary Internet Files and Firefox has its own cache. These help individual users load pages faster, but does not help a site load faster across the board. With WordPress 2.0, caching is built in. Queries to the database are saved because, if a page or setting has been loaded once, it is stored on the server file system for quicker load for all users.This is generally beneficial but can also cause problems, particularly if you wish to move your blog from one folder to another (For instance, if you have had your blog in http://example.com/blog and wish to move it to a new folder such as http://example.com/wp). Because database options have been cached, WordPress still thinks it is at another location.To get around this, edit wp-config.php and add the following line before the closing ‘?>’.
    1
    define(‘DISABLE_CACHE’, true);
  2. Image Uploading – In previous version of WordPress, there was an “Upload” feature available through the admin menu. That menu item is no longer. It has been replaced with an uploader on the edit page. In theory, bloggers can upload images and then drag-and-drop the image into the post. Unfortunately, this feature has caused much heartburn for some testers. There are options to use a full-size image or a thumbnail in the entry, but either way in pre-release versions, this feature seems to be iffy at best with various platforms and browsers.  This will probably be an item that is improved upon, but for the time being, manually editing the HTML with specified dimensions is best practice.Also note that dragging and dropping images when not using the Rich Text Editor will only create a permalink to the image.
  3. Use WordPress for Social Networking – There are probably a thousand social networking tools out there – many of which have plugins for WordPress available to them.  Someof these are Flickr , del.icio.us or Digg.  However, WordPress has built-in integration with such a tool in that allows search engines understand your relationships with other bloggers.  It is called theXFN (XHTML Friends Network).  XFN allows bloggers to establish links in their link manager (blogroll) as “friend”, “co-worker” or “crush” among others. It even allows you to designate whether you’ve physically met the person.

 

  1. Hooks and Filters – Hooks and Filters are a boon for plugin developers. They are what allows plugin developers to modify the behavior of WordPRess without actually changing the core files. Of course, filters and hooks are not a new concept… there’s just more of them in WordPress 2.0. Filters are functions that do as they suggest – filter. Items like a subject header can be filtered through to create an effect or change the way an item is displayed. Hooks give the developer a way to ride the coat tails of an existing “element” (such as a header or the rendering of a post, etc) and perform an action of some sort. An example of this would be to have someone emailed whenever publish_post occurs. (Of course, this is already something that can be done so it is a poor example).

 

  1. Built in Anti-Spam – WordPress 2.0 now ships with Akismet, a built in spam-filter. I’ve been using Akismet spam filtering since October 25th, the day it was launched and I have had one spam comment make it through to my moderation queue. There are alot of other plugins that do spam filtering, but in the past it has often required blogs to use two or more plugins just to get a good grip on comment and trackback spam. There is one hitch though.  Akismet users will need to register for an API key in order to use it. It’s free and worth it.

 

  1. Don’t Use the Rich Text Editor – WordPress developers will likely scorn me when they read this, but it’s my entry, right?  WordPress 2.0 includes TinyMCE, a javascript Rich Text Editor that gives bloggers a familiar Microsoft Word-like editor complete with common shortcut keys like Ctrl-B for Bold, Ctrl-I for Italics, etc.There are a couple problems I see, as a web purist, with this approach. TinyMCE, though it will probably continue to be improved, creates really shoddy HTML in some cases. Empty tags, funky cut-and-paste, and the now-internally-infamous shoddy image feature makes it great for quick and dirty entries but poor for day-to-day usage. I don’t use Safari, the preferred browser for most Mac users, so I can’t be sure if it works yet for you Safari users, but last time I recall it didn’t.
  2. WordPress as a Content Management System – Suppose you like WordPress as a blogging tool and you wish to use it to run non-blog sites. This is a distinct possibility, and not necessarily WordPress 2.0 specific. In fact, I’ve been doing this for the past few years in one form or another.Let me give you an example of one such site. My father is a pastor at New Covenant Community Church in Audubon, New Jersey. (Feel free to visit. I’m sure he won’t mind!) This site is completely WordPress 2.0 driven and it doesn’t even resemble a blog! The question is, how did I accomplish this?Well, there’s a couple of things I did and I’ll bullet point them for quick reference.
    1. Because we wanted the front page to have a different layout than the rest of the site, we created a special template file called NCCC_Main_Page.php. To make it usable for our front page, we needed to add this block of code near the top (after the opening ‘<?php’)
      1
      2
      3
      /*
      Template Name: NCCC_Main_Page
      */
    2. We created a “page” with our home page content and selected the NCCC_Main_Page  template from the Page Template drop down.
    3. We then downloaded the Static Front Page plugin and followed the instructions to install it.
    4. We created the content for our home page and assigned it a page slug of “home” (Note:this is most easily done by assigning the page title of home and then changing it to something more useful after publishing)
    5. Because most non-blog sites, including NCCC’s, have a manageable number of pages, we were able to create Entries in WordPress and create a static menu using the entry permalinks. There are built-in functions and plugins to make larger amounts of content more manageable and automatic.
    6. As a bonus, we did create a non-blog blog of “Upcoming Events” by posting under a specific category. The permalink to this page was a mere category archive permalink with the specific category used in the archive call.  This provides added benefit of enabling an RSS feed of upcoming events.