WordPress 2.8 has now been released and as always, it’s a great improvement on the previous version. I’ve been using it on a couple of sites and so far the biggest improvement has been the theme editor with its colour coding and line numbering.
There are a few other good looking features, the widget interface has improved greatly and you can now arrange your dashboard into four columns. Under your General settings you can change your timezone to a city in your country and then update for daylight savings which is a major update for those of us who forget!
Finally you can now control how many items are displayed per page in your admin, great for those who want 50 posts on the edit posts page rather than the default 15. To change this you need to go into the page eg. Edit Posts, the click on the Screen Options tab at the top and there you can change it to how ever many you want (it says 20 but there are only 15 there by default, honest!).
So how about the new template tags available? There are a few which are listed below. This won’t seem as major as the 2.7 upgrade where we had new code for the comment listing, however, the tags below may be of use to some and should help tidy up your code even further in areas.
- This new tag allows us to display the author who last modified the post. We already have the_modified_date() which displays the date the post was last modified. This is handy if you wanted to display the post date and author as well as the modified date and author, of course more useful for multi author sites.
- This will return the description for the given tag ID, useful if you wanted to output it at the top of your tag theme file.
- term_description($termID, $taxonomy)
- This returns the description of the give term ID for the specified taxonomy. The latter parameter can be ‘category’, ‘post_tag’ or ‘link_category’.
- This allows you to insert the Lost Password URL within your page. If you supply a redirect URL then once the lost password is requested the user will be redirected back to the page specified for example, to return the user to the page they were on use the get_permalink() tag eg. wp_lost_password_url(get_permalink()).
- the_author_meta($field, $ID)
- This will display an Author’s meta data stored under the wp_usermeta table. If used with the loop then the $ID can be omitted (if you want that author’s details). A number of fields to specify are available, the more useful ones in a template being:
If you want to return the data then use get_the_author_meta($field, $ID) instead. (Note: this will eventually replace many of the the template tags starting (get_)the_author_. Check the deprecated tags list for more info). This tag seems to be similar to get_usermeta(), it just doesn’t require a user ID specifying.