Archive for the ‘frozen toothpaste’ tag

Making the Frozen Toothpaste Archives

Last week, I finally switched my blog, Frozen Toothpaste, to a theme of my own creation. It’s unoriginally called “FTp_one,” after BWO_one on which it’s based. And though FTp_one will probably never be freely-available, I’m going to do my best to make any interesting aspects of it — sadly there aren’t many — common knowledge.

One of the best features in FTp_one is the Archives. I talked about how to improve archives from the WordPress norm previously, and what I’m about to explain builds on that. You may also want to find out how to show your archives page in WordPress, if you’re not certain of that process.

How it’s better

The Frozen Toothpaste archive began with the same archives.php file that is included in my themes (that’s the one with Justin Blanton’s Smart Archives plugin built in). I added three aspects, however, all of which are significant improvements on that version. Because they’re still far from the norm in WordPress themes, I’ve decided I don’t want to natively include them in my themes, but I do want to make them easy to implement. That’s why you’ll find a link at the bottom of this article to the full archives.php I’m using at Frozen Toothpaste. This should easily drop into place in ANY WordPress theme and installation, though it may look a little wonky without the necessary styles.

Frozen Toothpaste Archives 1

Okay, lets discuss the three big improvements. The first is that there are words on the Archives page. This shouldn’t be half as novel as it is. It’s also notable that in those words are links to each section of what can be a very long archives page.

Secondly, there is a recommendations section. This is a very useful feature because, well, no one’s likely to read everything you’ve ever written to find the best stuff. The recommendations sections is great way for visitors to see some your best stuff and easily find out if they like what you’re doing.

Frozen Toothpaste Archives 2

The final feature is the tag cloud. Since WordPress 2.3 was released, making a tag cloud has been easy. The issue is that for established blogs with lots of back content, getting all of that tagged is problematic. Also, because many people are still running WP2.2 and earlier, I’ve decided to leave any tag data out of my canonical theme work.

How I did it

Now to the implementation. Both the “text” and recommendations section are enabled by the same basic features that all other archives.php seem to lack (for reasons I don’t understand). Essentially, most archive pages omit The Loop, which tells WordPess to get the words entered into the “Post” section for your archives page (as it does for every other page.) To correct this problem takes only a few simple lines:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="archivetext">
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>

These lines are essentially the basic loop that makes WordPress run. The first line tells WordPress to proceed if there’s text to display, the third line spits out the text, and the fifth tells the processor to proceed if there was nothing to display. (Lines two and four are merely to make it easy to style the text that WordPress has spit out.)

With this code included in your archives.php file, any text you enter into WordPress (as you normally would) will be displayed. This allows you to easily create and edit your recommendations section, because it’s as easy to get to as a normal page in WordPress. This also allows you to create links your category section, for example, by simply including a link to “#category.”

Finally, the tag cloud. As I said, this is scandalously easy to do in 2.3 and above. All you need are these two lines:

<h3><a name="tags"></a>By tags:</h3>
<?php wp_tag_cloud('smallest=10&largest=28&number=30'); ?>

Here the first line merely gives us a title for the section, including the syntax so you can link to the section with a simple “#tags” link. The second line leverages WordPress’s wp_tag_cloud command to create the cloud. It also includes instructions that the smallest output should be 10 pixels tall, the largest should be 28, and that we only want it to show the 30 most common tags. All of those values can be changed to anything you want. (There are also other variables for this command, which you can find in the WordPress Codex.)

Give it to me

There it is: all the instructions you need to improve any archives.php page. And now, the whole page, as promised, for you to drop into any theme you think could benefit from a better archive. Download it! (The file you’re downloading is archives.phps, you’ll want to rename it archives.php before you try to use it.) Happy blogging!

Critiquing the Blogosphere

I posted a story at my other site/blog (Frozen Toothpaste) earlier this week about the blogosphere. It doesn’t — strictly speaking — relate to blog design, but it does offer some interesting perspective into what is usually successful in the blogosphere and what isn’t.

I’ve chosen a few excepts, which or below, or you can click here to read the whole thing. The story also features a demonstrative graph, which — though ugly — illuminates the concept.

I should probably also make clear that I don’t claim a blog can be conclusively marked on such a system. Where I may see a deeply flawed blog full of less-than-interesting writing, others may see the greatest literature of the 21st century. Nonetheless, I think most people would, overall, agree to the basic formulation of this system.

The vertical axis in this scheme is specificity, or how relevant a blog is to the potential audience. It is rated inversely, thus, the more specific a blog is, the lower it’s “specificity” score. At one extreme of this axis, you find the extremely personal. (”I fed my dog today, a little more than usual. He’s seemed really hungry recently. I wonder if it’s because I painted the study.”) These are blogs that are essentially relevant to the writer and the ten people who know them best, after that most people just aren’t interested.

At the other extreme of this axis you find something with very wide, if not universal appeal. This is the type of thing you’re likely to find in most newspapers or magazines. It should be noted that something can be specific to say, gadget nerds, but still be rather universally read. Thus, specificity could be seen as self-centeredness. The difference is between the friend who only talks about herself, and the one that’s more interested in sharing ideas, facts, news, or cool videos—which are interesting to the audience of readers, not merely the author.

The horizontal axis of this system rates a blog’s novelty. At the very low end of this spectrum you find the very common. As just one example, it’s the posting of “This is so funny” followed by a link or the embedded video of Miss Teen South Carolina, or Chris Crocker, or Seth Green imitating Chris Crocker—video or links which, when posted, have already been seen by the entire interested audience. At the other end of this spectrum is the extremely novel, which in these internet times is usually a truly unique idea of the author, an obscure link the audience has never seen before, or well-presented insight into another perspective on the world.