is_frontpage: plugin for static homepages in WordPress 2.1.x

If you remember, WordPress 2.1 have introduced a built-in support for static frontpages. It caused some confusion initially, cause plugins which used to provide this functionality, stopped working completely. However, one you discover the feature, it’s very easy to use it.

There is one small problem though: is_home() function will not work for such static frontpages. To work around, you can use a plugin called is_frontpage. Here’s how its author, Martijn Stegink, describes it:

Version 2.1 of WordPress introduced native support for a static frontpage, which only has been supported by plugins before. When using this option however, the is_home function doesn’t work. This is because is_home is supposed to return true for the “blog” home page, where your most recent posts show up, not the “front” home page. An is_frontpage function is not available yet.

Therefore I whipped together this small plugin, called is_frontpage. Just download the plugin drop the file in your plugin folder, activate the plugin through the admin interface and the is_frontpage function is available to you. Use it just like the is_home function. It returns true if you’re at the frontpage you set, otherwise it returns false.

Taken from: blog

Upgrade to WordPress 2.1.2 right away!


If you still haven’t taken time to upgrade from WordPress 2.1.1 to WordPress 2.1.2 – do this right now! You can read the official explanation on the WordPress blog, but the bottom line is that WordPress 2.1.1 downloads have been altered by a hacker, and therefore may contain a security exploit.

To make sure you’re secure, it is advised that you download and install WordPress 2.1.2.


Note: this only affects users of the WordPress 2.1.1 build, any other WordPress 2.x version was not infected.

pS: if you need help with upgrading your version of WordPress, feel free to leave a comment to this post and I’ll be sure to contact you by email.

Advanced Editor Options in WordPress 2.1

Since upgrading to WordPress 2.1, I’ve finally switched back to using the built-in posts editor. One of the reasons for doing this was that I’ve found the options I so needed – text justification and HTML code cleanup – available through the advanced editor options panel.

Pressing Shift+Alt+V in Firefox or Alt+V in Internet Explorer transforms your Standard Editor panel:

… into something like this:

As you can see, there’s quite a few more options available, namely:

  • paragraph formattion options (address, preformatted text, headings)
  • underline your text
  • full justification
  • color selector for your text
  • paste options for plain text and MS Word
  • messy HTML code cleanup
  • custom character button (charmap which allows you to click and insert any special character)

With all these options, there really is no reason to search for a better visual editor anymore. TinyMCE, which is the engine behind it, fits WordPress 2.1 like a glove, and makes editing your posts and pages a real pleasure.

WordPress 2.1

It’s been a bit over two weeks since the release of the long awaited WordPress 2.1, codenamed Ella, and although I had upgraded one of my blogs the very next day when it became available, it’s only now that I finally have some time to post about it.

First of all, please go and read the official announcement of WordPress 2.1. Once you learn all the new features, you will immediately know whether it’s worth upgrading or not.

If you have WordPress 2.0.5 and anything below it – don’t even waste your time: it is time to upgrade! Get at least version 2.0.7, although in most cases you should be okay just jumping up to 2.1.

There are many wonderful features in 2.1, but I personally like the following ones:

  • Autosave – an AJAX-powered feature to save you from losing any of your ingenious posts again. Quite often, having typed a page or two of text, you lose your text if your browser crashes or something else interferes before you hit the Save button – so this Autosave feature is a real saver (pun intended).
  • New visual editor for posts and pages – a much better looking editor which has a different tabbed interface for easier switching between post and its HTML code and also includes a spell-checker. It pleases me a lot that all the dialog windows appear normally in Firefox 2 now, cause they definitely were buggy in WordPress 2.0.7.
  • Admin area rework – it works much faster, thanks to more AJAX code and a cleaner CSS.
  • Upload manager – for a much easier uploading and management of your media files

Hope I got you interested in at least giving it a try? Although if you haven’t done this by now, there’s hardly anything to convince you. As a last resort kind of a thing, I offer you a 10 Things You Should Know About WordPress 2.1 by Aaron Brazell at Technosailor. His article gives a great introduction to new features, and I think you will benefit from it even if you think you know enough.

WordPress 2.0.7 is ready

WordPress 2.0Yet another update of WordPress has been posted yesterday: WordPress 2.0.7.

Here is what the WordPress official blog has to say:

Recently a bug in certain versions of PHP came to our attention that could cause a security vulnerability in your blog. We’re able to work around it fairly easily, so we’ve decided to release 2.0.7 to fix the PHP security problem and the Feedburner issue that was in 2.0.6.

Here are the changes which the above comment mentions:

  • Security fix for wp_unregister_GLOBALS() to work around the zend_hash_del_key_or_index bug in PHP 4 versions less than 4.4.3 and PHP 5 versions less than 5.1.4 with register_globals set to “On.”
  • Feeds now properly serve 304 Not Modified headers instead of mismatched 200/304 headers (a.k.a. the FeedBurner bug).

For a full list of changes since 2.0.6, please have a look at the original post with WordPress 2.0.7 announcement.

You can't be too secure, and with this in mind I've just updated both my WordPress-based blogs and strongly suggest you do the same.

Creating a theme in WordPress

First off, she's given us a list of useful resources for creating WordPress themes, and then came the actual posts.

So far, there are two posts describing two steps of creating a theme:

  • In this post, Rachel talks about the basics of your new theme layout. Before you get to actually code your WordPress theme, you really need to get absolutely clear about what you want your visitors to see on you blog and why.

    Your layout is supposed to be a well-thought positioning of your blog elements like logo, main menu, actual posts and additional content.


I think this series will prove to be invaluable to anyone who's interested in creating WordPress themes of their own. I personally had never created a theme from a scratch, but have customized a number of them – so it is a good opportunity for me to understand the whole process even better.

Security Alert: templates.php XSS vulnerability in WordPress

Thanks to Thilak of TechBuzz, I've just learned about wp-admin/templates.php (part of your WordPress administration functionality) seems to be vulnerable to a rather nasty XSS exploit.

All the versions of WordPress prior to the future 2.0.6 are vulnerable to this issue, so it's highly recommended to back up your current templates.php file and replace it with a patched templates.php file (mind you, it's a WordPress 2.0.5 version of this file).

For more details, please read the WordPress Persistent XSS post by David Kierznowski who is credited with discovering this vulnerability. David has also posted a proof of concept for this exploit: WordPress template.php exploit.

For a structured description of this problem and a fix for it, please consult the relevant Security Focus discussion.

WordPress 2.0.5 released

That's it, folks! The next version of WordPress – 2.0.5, codenamed Ronan, is finally available for download. For those of you who haven't seen the highlights of changes in this version, I strongly recommend you to have a look at a summary post by Mark Jaquith, Changes in WordPress 2.0.5

According to the announcement, this version brings fixes to 50 or so bugs, which alone is quite an effort giving the complexity of this ever-evolving blog engine.


How To Improve Your Blog Usability And Why You Want To Do It

Usability of your blog is one of the most important factors of how successful and popular it is. Yet, it is often neglected.

Read on to find reasons and motivation for improving the usability of your blog, and once you feel totally convinced, I'll show you some of the best tips to greatly improve your situation, listed along with instructions and links to respective online resources.

What is usability?

Speaking of web, usability is a term used for showing how easy (or hard) it is for your visitors to browse your online resource. Usability applies to all kinds of online resources: it can be a regular website, an electronic library or a personal blog – it doesn't really matter. What matters though is how easy it is for people to move around your collection of resources, and how comfortable you make this experience for them.

In general, usability indicates just how easy it is for people to use a particular tool in order to achieve a certain result. When you project it into the world of blogging, this makes your blog a tool. It is both a tool for you to share the information and for users to receive it. So improving your usability means making both primary uses of your blog a pleasant experience.


Why improve usability at all?

With millions of blogs updated daily, the pressure is growing every day for every one of us to raise the standards of our blogging. Demanding visitors expect increasingly more, and this means that the basic level of usability has to be maintained by every blog, including yours.

Unless you're a selfish genius who writes posts for himself, you would really want to make sure your visitors get what they expect to see when they arrive at your blog, and it's therefore absolutely vital to make them feel comfortable browsing your pages. Especially so, if you hope for some of them to come back to your blog again and again.


How To Improve Your Blog Usability

As with anything else, in order to improve your blog usability you need to find out reasons for doing so. After you understand all the reasons, you can focus on one particularly beneficial usability feature or another. Essentially, you want to define and write down the following:

  1. Your purpose for having a blog

    Why do you blog, really? What are the main goals you have? What is the purpose of your blog?

    You need to ask yourself all these questions to have eventually a list of pretty general goals of your blog, and make sure you can align your blog usability against such a list.

    Here are just a few examples of how you would align your usability improvements against your blogging goals.

    If your blogging goals are:

    • to provide visitors with useful information
    • to develop your skills and knowledge in relevant subjects
    • to gain more readership
    • to participate in blogging community

    …then your usability improvements should be respectively aimed at:

    • both increasing and simplifying ways to access information on your blog pages
    • encouraging your readers to leave comments and provide feedback
    • providing multiple means of reading your blog regularly – RSS feeds and email subscriptions
    • making sure you link to other blogs and get them to link to you
  2. Purposes your visitors might (should) have

    Why should anyone want to read your blog? What would your regular readers keep coming back for? What would a first-time visitor notice or discover first? What would your visitors be looking for?

    These questions are aimed to help you understand what kind of the first impression your blog is going to make. Imagine yourself to be a visitor to your blog. Open it up in your browser and look closely – what do you see first? Is this an important piece of information or just an accidentally highlighted design feature which bears no value?

    Again, here is a list of most obvious reasons you might have:

    • your blog contains genuinely interesting information of educational nature
    • you're an expert in your field, and visitors will come back for more information
    • your visitors are likely to be so interested that they will want to browse your previous articles
    • you are so brilliant that some people will want to read your blog regularly

    And they would mean the following directions in your usability enhancement:

    • highlighting the most recent information, notifying blog search sites about new posts
    • showing a list of most recent posts to make navigation easier
    • providing links to monthly archives of your posts and list of categories of posts
    • making RSS and email subscription options visible


Technical details 

Now that I've got you interested in usability enhancements, I offer you the following list of WordPress articles and plugins which I believe you will find useful:

  1. Blog posts archives pages
    It is very important that you give your visitors an option to access every previous post of yours with just a few clicks. Blog archives pages serve this very purpose.

    Consider using Justin Blanton's Smart Archives plugin, which will provide you with a very quick and effective way of showing your blog archives – with monthly sections and links to every individual post of each month.

    To see this in action, check out Perfect Blogger Archives page.

  2. Category lists

    Most themes for your blog would have a built-in and probably enabled by default functionality of showing a list of your categories somewhere on a sidebar.

    One of the easiest way to increase usability of such lists is to provide a total number of posts found in each of the categories. This will make it easier for your visitors to decide what category to read next, by helping them realize what categories of yours have most posts.

    To achieve this effect (you can probably notice how it looks right here on this blog), you need to use the list_cats function of WordPress:

    <?php list_cats(FALSE, '', 'name',
                            'asc', '', TRUE, FALSE,
                            TRUE, true, FALSE,
                            TRUE, FALSE, '', FALSE,
                            '', '', '',
                            TRue); ?>

  3. Tag cloud
    This is a brilliant way to improve usability of your blog. Effectively, you will allow visitors to pick only specific topics of their interest as oppose to limiting them by your own list of categories.

    Tags are more specific than categories by their nature, so don't be surprised to end up with a long list of tags in your tag cloud.

    The idea of tag cloud is that it's going to highlight (using different font sizes) the most popular tags of yours (the once set for most number of posts), once again highlighting the most talked about topics of yours. The working example is found on this very site on the left sidebar.

    Ultimate Tag Warrior is the best plugin for this purpose. It's rather complicated, but well worth the time it requires to be properly setup.

    If you prefer doing everything yourself, you might like this Building A Tag Cloud in WordPress article.

  4. Blog feeds
    When people like your blog, they usually want to read it regularly. And since the easiest way to do this is by receiving your blog feeds, there is definitely something you can do to make their life easier.First of all, make your feed button (or text link) visible.

    Don't expect people open up a separate window with HTML code of your blog to find the feed link manually (although that's exactly what I do for far too many blogs simply because it's impossible to find their feed button on the page). Most people won't be like me, they will just wonder where your feed subscription might be, decide to come back to your blog, and eventually forget to do it.

    A bright visible feed button is the least you can do for your future readers.

    Another usability improvement here is to install a Feedburner Feed Replacement plugin and get all the various formats of feeds (RSS is only one of them) redirected to your one and only public feed, which you need to configure at FeedBurner.

    Setting your FeedBurner account is easy enough, and having a single blog feed will make your life easier in many ways: not only will FeedBurner automatically show the feed in expected by a client program format (for instance, your feed aggregator might expect your feed in Atom, RSS or RSS 2.0 format, or it could be just a regular browser opening the feed URL – FeedBurner will show a nice looking page with your posts in this case), and most importantly it will allow you to effortlessly track your readership.

    Open this page in your browser to see my FeedBurner feed in HTML: PerfectBlogger.

  5. Comments on your blog

    There is a whole array of various plugins to make your comments management and representation better for you and your readers.

    I suggest you explore the Comments Plugins section on the WordPress development site.

    You can also benefit from reading the Editing your blog comments article by Lorelle on WordPress.

  6. Related posts

    This is another great way of improving usability of your blog.
    By interlinking (providing links to relevant posts of your own blog), you will make visitors stay longer on your blog. You will also help them explore more on the topic of their interest.

    I prefer specifying relevant topics myself, and for this purpose I suggest you use a Terong Related Posts plugin. It simply adds a link to your post editing window in WordPress, and allows you to select the relevant posts from a global list of all the posts. Selected posts will then be given as a neat list of links at the bottom of your post.

    If you would like relevant posts to be identified automatically, you should have a look at a Related Entries plugin by W.A.S.A.B.I. then.


External links

You should find these resources interesting and relevant to this article:

Challenges of Your Blog Comments

I just have to share this link with you! Lorelle VanFossen from the Lorelle on WordPress blog has just posted a great article on editing your blog comments.

The important lesson you can learn from this article is that comments on your blog, even left by visitors, are still associated with your blog. It is therefore in your own interest to make sure these comments look their best and bring the clear message across to other visitors and readers of yours. 

Lorelle seems to have covered every reason you may want to edit a comment for, and she also has thoughtfully given you tips on how to deal with certain situations like moving a comment to a new location in the most elegant way.

Truly, an excellent article I suggest you all read: Editing Your Blog Comments.