5
Building a Findable Blog

By following some simple best practices and using intelligent configuration techniques your blog is sure to be a pillar of findability that helps your site communicate with a broader audience and inspires repeat traffic.

As we saw in the previous chapter, blogs are a powerful content-delivery platform that can generate interest in your site, increase your inbound links, and create more search referrals. A blog can either function autonomously with few or no additional pages in your site, or it can be used as supporting content for a larger site funneling traffic into other areas of importance.

In this chapter we’ll explore some practical solutions that will help you configure your blog to promote search engine traffic, RSS readership, and see how social bookmarking and news sites can springboard your blog’s visibility on the Web. Before getting into the nuts and bolts of configuring your blog to be more findable, let’s take a look at some blogging best practices that can generate traffic and keep users on your site longer.

Blogging Best Practices To Improve Findability

The content and structure of your blog play a big role in generating search traffic and helping users find points of interest on your site. After blogging for a while you’ll start to discover what types of content your users are most interested in. Using some traffic analysis tools, you can see which posts are read the most and which keywords in your posts are generating the most traffic. This information can help you define the topics of future posts so you can continue to provide content relevant to your audience. You’ll find this information in the bonus chapter entitled “Analyzing Your Traffic” on the companion website http://buildingfindablewebsites.com.

Blogs are an amazing tool for discovering niche issues that attract a surprising amount of interest because they cover a lot of sub-topics within a primary subject. When you discover that one of your posts has generated a lot of interest, follow it up with a related post. Look for posts that have received the most comments. If you’re getting mostly positive comments or you’ve discovered a hot-button issue that people want to debate, keep the momentum with more posts.

There are a lot of simple but critical ways to make your blog successful. Following these best practices will help you bring in new readers and keep them on your site longer. We’ll explore the technical solutions for many of these recommendations later in this chapter.

Image
Matt Cutts (http://www.mattcutts.com/blog/), head of Google’s Webspam team, spoke at WordCamp in 2007 and offered some insight into SEO for blogging.

Part 1 is at http://one.revver.com/watch/352281.

Part 2 is at http://one.revver.com/watch/352486.

Write Regularly on a Focused Topic

Although it was already mentioned in Chapter 4 in the section entitled “Content of Many Flavors,” it’s worth repeating that in order for any blog to be successful you need to stay on topic. Define your primary subject for your blog and stick to it. It’s OK for your topic to have many sub-topics, but try not to veer too far off course or you may begin to lose readers.

People will visit your blog because they find it entertaining, inspiring, or educational. If your blog stops delivering the content that brought them in initially, they’ll stop coming back.

Link Often, and Link to Other Blog Posts To Generate Trackbacks

Make sure your blog posts include plenty of links to other sites to provide value for your readers. Rather than just writing about interesting things, show your readers where to find more. Although links in your post may draw users away temporarily to explore another site, they’ll return for more of your link recommendations.

Linking to blog posts on other websites can help build the number of inbound links to your site. Blogs that are the recipients of links in your posts will automatically be notified when you publish. An excerpt of your post and a link to your site will be displayed in the comments section of the recipient blog. This is called a trackback. It should be noted that the recipient blog’s author could choose to approve or reject your trackback. If they do approve it, though, you’ll have created a new inbound link to your site, which can help you build your Google PageRank.

Trackbacks often get abused by spam bloggers who write nonsense and include links to other blog posts so they can dishonestly build their inbound links. When used as intended, trackbacks are a great way to build a discussion within a community, and share traffic among peer sites.

Create Your Own Blog Template

If you want your audience to take your blog seriously you’ll need to ditch the default templates the application often comes with and create your own. By creating your own template design you can establish your blog’s identity or tie it into the look of the rest of your site. It also affords you the opportunity to build your HTML to be more search engine friendly as outlined in Chapter 2.

Because life’s not always so utopian, you may find that you don’t have either the time or knowledge to build your own blog template. For small, personal blogs a pre-built template might be an option worth considering. Templates for different blogging platforms are readily available from many sites on the Web that you can track down with a quick Google search. Also, check the official site of the blogging platform you’re using, as it may provide links to recommended template sources. Since third party template designs aren’t built into the blogging platform they’re less likely to be used by quite as many other bloggers, and they can still seem unique to your audience. Once you’ve settled on a template you like, make some quick modifications to the HTML to improve SEO.

Put Keywords in Your Post Titles

As we discovered in Chapter 2, heading tags are an important place to position your keywords to help encourage search referrals. When you build your custom template for your blog, use a prominent heading tag such as <h2> to assign greater prominence to the keywords within your post titles. If you recall from the section in Chapter 2 entitled “How to Use Heading Tags, it’s a good idea to reserve the <h1> tag for the name of your site or organization as it is top in any site’s information hierarchy.

As you write your posts you can use headings of other levels to delineate subsections. This will make your content easier for your readers to quickly scan and provides even more opportunity to make your keywords more prominent from the perspective of search engines.

A good post title will sum up the post using some of its important keywords and phrases. The text in headings often gets automatically repeated in the <title> tag by the blogging application, and sometimes in the meta description tag, depending on how your blog is configured. Choosing your post titles wisely can create a good keyword density and prominence that can generate search referrals.

Consider these two headings for the same blog post:

“One More Thing”

“Steve Jobs Unveils New iPods at Press Conference in Cupertino”

When presented in context with a few descriptive paragraphs, the first headline might make sense to people who know this is Steve Jobs’ catch phrase when revealing new Apple products. But because it contains no descriptive keywords it’s not likely to generate the volume of search referrals that the second headline will. A concise but descriptive headline that includes relevant keywords will communicate more clearly to search engines and users alike.

Remember that your blog headlines will often be read in news aggregators like Bloglines (http://bloglines.com) or Google Reader (http://google.com/reader). In this context your headline might be shown without the accompanying text. The quality of the headline will determine whether your users will read further and potentially visit your site for more detailed information.

Don’t overengineer your post titles. Although it’s important that they contain keywords, make sure they still communicate to your users first and search engines second.

Archive by Topics

Blogs have automatic archiving systems that organize old posts so users can easily browse through them. Blogging systems often offer a number of options for generating your archiving system, including archive by date and archive by topic or category.

Archiving by date is usually a bad idea for two reasons:

1. Users don’t care when a post was made. They just want to find the content they’re looking for. An archive by topic makes it a lot easier for users to explore posts that are most relevant to them.

2. Archiving by topic places important keywords in your page that can help optimize your site for search engines. Topic titles tend to closely parallel the keywords you might be targeting already, thus helping improve your keyword density.

As shown in FIGURE 5.1, Internet marketing consultant Ed Shull’s site Net Results (http://netresults.com) displays its categories prominently at the top right of the layout to promote browsing by topic. Net Results also offers RSS feeds for each category so users can stay abreast of the stories in categories they find most interesting.

Figure 5.1 Net Results (http://netresults.com) displays category links at the top of the page to promote browsing by topic. The site’s topics also mirror target keywords featured in the <title> tag and elsewhere in the page.

Image

Summarize Posts To Direct Traffic Better

The home page of your blog can direct your traffic best if it displays short summaries of posts rather than the full text. A prominent headline followed by a short summary gives users enough information to know whether they want to read further. More headlines on a page means your users can get a bird’s eye view of content options, and will be able to explore your site more thoroughly. Full post displays bury older posts way at the bottom of the page where users are likely to miss them.

Shaun Inman’s blog (http://shauninman.com), as shown in FIGURE 5.2, displays just headlines and the date of each post. With this approach he’s able to present a lot of posts to his users in a limited space.

Figure 5.2 Shaun Inman’s blog (http://shauninman.com) displays headlines on the home page, which gives users a good overview of the most recent posts and encourages broader exploration of the site.

Image

Add a Popular Posts Section

Your best posts that have attracted the most traffic can get lost in your archives if you don’t help users find them. Including a popular posts section on your blog can help users find the content that many other users have found useful.

Though a post might be old it can still be very relevant to your audience’s needs. As shown in FIGURE 5.3, Problogger (http://problogger.net) provides its users with a really great tabbed browsing system to quickly view the most popular posts of all time, popular posts of the past month, recommended posts for beginners, and the author’s favorites. This simple system brings 35 posts to the user’s attention that would have otherwise been buried.

Figure 5.3 Problogger (http://problogger.net) provides a brilliant popular posts menu.

Image

Add a Recent Posts Section

Repeat visitors to your site will look for your latest blog posts. You can make it easy for them to see what’s new by adding a recent posts section to your blog. Display your recent posts in a prominent location on the page so users don’t miss them.

As shown in FIGURE 5.4, Dave Shea’s site Mezzoblue (http://mezzoblue.com) features a concise listing of his recent posts at the top of the page, making it easy for users to dig into his content.

Figure 5.4 Dave Shea’s site Mezzoblue (http://mezzoblue.com) lets users know what’s new on his blog by prominently displaying a concise list at the top of the page.

Image

Tell People Who You Are and What Your Blog Is About

When new users arrive at your site they usually have no idea who you are, and what your site’s about. Adding a short introduction answering these questions can help users figure out if your site might have the type of information they are looking for.

Lifting the curtain to reveal the author behind the blog also helps create a sense of trust and connection with users. Adding a photo can literally put a human face on your blog that can strengthen your audience’s trust in the content. Adding links to a profile and contact page within your introduction lets people learn more about you if they’re interested or get in touch with you.

As shown in FIGURE 5.5, Jesse Bennett-Chamberlain does a nice job of introducing himself to his audience on his blog 31Three (http://31three.com/Weblog). A photo and a friendly paragraph let users know where he’s from, what he does, and how to get in touch with him. At the top of the page a tagline gives users an idea of what this site is about.

Figure 5.5 Jesse Bennett-Chamberlain’s blog 31Three (http://31three.com/Weblog) provides visitors with a friendly introduction that can instill trust in his content.

Image

Promote Your RSS Feed

Users who subscribe to your RSS feed are very likely to return to your site, so you want to convert as many new visitors as possible to subscribers. Be sure to promote your RSS feed in a prominent location on your blog using recognizable icons.

Icons work as a visual landmark in design and communicate with users much more quickly than text labels. Matt Brett has created a great series of RSS icons and Illustrator source files you can use to customize your feed icons to match your site’s design (http://feedicons.com/).

As shown in FIGURE 5.6, Bartelme Design (http://bartelme.at) displays a slightly modified version of the typical RSS icon prominently at the top of the layout to encourage subscriptions. Users can subscribe to the blog feed or a feed of recent bookmarks.

Figure 5.6 Users who subscribe to your RSS feed are much more likely to return to your site.

Image

Cross Link To Circulate Traffic

When you write blog posts, reference and link to previous posts or other content areas on your site. Linking back to old posts can resurrect them from the archives and create greater depth to your post by providing further reading on the topic.

Remember that your blog can be a powerful tool to funnel people into other parts of your site, such as your portfolio, a products section, or any number of important areas where your business and communication objectives for your site can be accomplished. If your goal is to get more clients then write a case study blog post that links to your portfolio where users can see other projects you’ve worked on.

Encourage Users To Share Your Content With Others

If you read blogs yourself you’ve probably seen many sites that offer links at the end of their posts to share the URL in a social networking sites like Delicious (http://del.icio.us), Magnolia, or Digg (http://digg.com). As shown in FIGURE 5.7, some blog platforms like WordPress offer extensions to their system that will automatically add social networking links to the end of your blog posts to encourage users to share your URL. When users bookmark your site on any of these social networking systems they expose new users to your site and offer their personal endorsement.

Figure 5.7 A typical series of links at the end of a blog post that help encourage users to share a link to your site on Digg, Magnolia, Delicious, and other social networking sites.

Image

Digg is a very popular social news site that lets users vote on what news should be prominently featured. Each vote for a news post is called a “digg.” There are countless stories on the Web of blogs getting enough diggs to be featured on the home page of the site and then being flooded with traffic. It’s a little like winning the findability lottery. It might not happen often, if at all, but if it does it will probably pay off big!

Direct Users to Related Posts

When users are done reading a post you can keep them on your site longer by suggesting related posts to read. Problogger (http://problogger.net) uses an automated system that identifies the same keywords in other posts as the current one and generates a list of links to connect users to other content that may be of interest. See FIGURE 5.8.

Figure 5.8 Problogger (http://problogger.net) includes a series of links at the end of each blog post suggesting other posts that readers may find interesting.

Image

When users stay longer on your site they are likely to find content they value, and will come back again for further exploration.

About Duplicate Content Indexing

It’s a common misconception that search engines will penalize the page ranking of sites that publish duplicate content. If this were true a large part of the Web would incur significant ranking penalties.

Blogs inherently generate duplicate versions of their content. Your archives, categories, home page, and RSS feed can all feature the same content under a different URL.

There are black hat search engine optimizers on the Web that duplicate content intentionally in an effort to manipulate their page rankings and dishonestly generate more traffic to their site. When multiple pages are published with the same content a search engine could potentially return multiple link recommendations to the exact same content, which would degrade the relevance of their service. Search engines do a good job of identifying duplicate content, and can identify when it’s being served with dishonest intentions.

It’s very unlikely that your blog is going to incur any page ranking penalties because the archives, categories, and RSS feed present duplicate content. If you want to cover your bases anyway, eliminating redundancy can be easily done with a robots.txt file in the root directory of your server (discussed in Chapter 3 in the section “Controlling Search Engine Indexing with Robots.txt”).

Because the URL structure and feature set of every blogging platform is different there’s no-one-size-fits-all code solution. What you’d need to do is look at your blog and identify where you have duplicate listings, then use disallow in your robots.txt file to block indexing of those areas. Here’s a simple example that could be used to eliminate indexing of redundant content in feed and trackback URLs:

User-agent: *
Disallow: /*/feed/
Disallow: /*/feed/rss/
Disallow: /*/trackback/

The first line of the robots.txt code applies the following Disallow rules to all search engine user agents. The next three lines use * as a wildcard indicating anything can appear at the front of the URL. Search engine spiders would ignore any of the following URLs:

http://example.com/feed/
http://example.com/feed/rss/
http://example.com/2007/08/31/my

The last URL is an example of a trackback that would be used by other bloggers to link to a blog post.

Search engines do a good job of identifying the best URL to refer users to when they encounter duplicate content. It’s very easy to modify your robots.txt file to try to cut down on some of the duplication, but so long as it’s not being done as a black hat SEO trick you don’t need to worry about receiving a page rank penalty.

Working with WordPress

There are a lot of really great blogging platforms on the market, so many that it would take an entire book to compare them in detail, and even more books to talk about each individually.

WordPress (http://wordpress.org) is one of the most widely used blogging platforms. Its popularity stems from its great features, quick setup, ease of use, and massive community support.

From a findability perspective, WordPress is pretty alluring. Its simple theme system makes building your own templates with a semantic, standards-compliant structure easy. It has an open architecture for which anyone can develop plugins to add features that were not originally included. Thousands of plugins are freely available to extend and customize your WordPress blog to do all sorts of things that can improve the findability of your blog.

Nearly all of the blogging best practices discussed earlier in this chapter can be addressed with a free, easy-to-install WordPress plugin. Generating traffic to your blog, helping users find the information they’re interested in, keeping users on your site longer, and bringing them back again are all made much simpler with WordPress and the right selection of plugins.

The default WordPress installation has many features that improve findability including the following:

Image Search

Image Search engine friendly URLs

Image Custom 404 error pages

Image RSS publication of blog posts, comments, and categories

Setup of WordPress is famously fast, taking just 5 minutes. You can either host your blog from http://wordpress.com or download the PHP/MySQL application (http://wordpress.org/download/) and install (http://codex.wordpress.org/Installing_WordPress) it on your own server. The download and install approach is preferable as you have much more control over customization of the templates.

Image
If you’re interested in learning more about WordPress, take a look at Maria Langer and Miraz Jordan’s book WordPress 2 (Visual QuickStart Guide), published by Peachpit Press.

The extensive WordPress documentation (http://codex.wordpress.org/) and helpful forums (http://wordpress.org/support/) can set you straight if you run into troubles with installation or configuration.

Once you’ve got WordPress up and running, you’re ready to configure it for findability.

Installing WordPress Plugins

Most WordPress plugins can be installed following a standard, simple series of steps:

1. Download and unzip the desired plugin.

2. Upload the plugin to the plugins directory located in the wp-content directory (/wp-content/plugins/).

3. In the WordPress admin control panel navigate to the section called “plugins”

4. Click the activate link next to the name of the plugin you want to install.

Most plugins are distributed with a read-me file that provides specific instructions on the installation process. Be sure to read the plugin’s instructions to ensure it follows these same steps before installing it. Once a plugin is installed it usually creates a preferences panel where you can configure its functionality in the admin control panel under the Options tab.

We’ll be using this installation process for each of the plugins discussed in this chapter.

Creating Your Own Themes

WordPress can be skinned using themes, which consist of a series of PHP files that logically divide the blog into modular sections including a header, footer, sidebar, etc. Descriptive functions—called template tags—are used in themes to display dynamic content like post information or archives.

It’s a good idea to create your own theme for your WordPress blog rather than using one of the preinstalled themes. Creating your own theme gives you the opportunity to optimize your code for search engines, and will let you create a design that is unlike thousands of other WordPress blogs. If you’re creating your own theme for the first time you might want to read the WordPress documentation about the structure of themes and how to develop them (http:// codex.wordpress.org/Theme_Development). Once you take a look at an existing theme and check out the helpful documentation it’s pretty easy to whip together your own design. You may find it easiest to create a copy of the default theme and modify it to fit your needs.

Image
To learn how to convert your XHTML/CSS blog template into a WordPress theme take a look at this article on The Undersigned entitled “From XHTML/CSS to WordPress” http://theundersigned.net/2006/05/from-xhtmlcss-to-wordpress/.

Some of the blog optimization techniques we’ll be talking about in this chapter require a little knowledge of WordPress’s theme system, but if you’re not yet comfortable with it you can still use any of the easy-to-install plugins discussed to improve your blog’s findability.

Making Your WordPress Blog More Findable

WordPress can be made more findable by modifying some of its configuration options and by extending its feature set with third-party plugins. To get started, log in to your WordPress admin control panel.

Defining Update Services

Our first modification to WordPress will be to extend the number of update services that are pinged when you publish new content. Services like Technorati (http://technorati.com) and Google Blog Search (http://blogsearch.google.com/) keep tabs on all content published by blogs throughout the Web. WordPress sends a brief message—called a ping—to these services so they can update their indices with your latest content. When your blog pings the major update services, users will immediately be able to search aggregators, search engines, and directories to find your site.

To set up a comprehensive list of update services on your WordPress blog

1. In your admin control panel, go to Options and choose Writing. At the bottom of the page, you’ll see a large text box labeled “Update Services” (see FIGURE 5.9). The WordPress site provides a great list of update services within its documentation including Technorati, FeedBurner, Google, and Yahoo!, which you can find at http://codex.wordpress.org/Update_Services.

Figure 5.9 WordPress lets you add a number of services to automatically notify each time you publish new content on your blog.

Image

2. Copy the entire list of URLs and add them to your update services to widely broadcast to the Web that you’ve posted new content on your blog.

Keeping all of these sites updated on your blog posts can really help increase traffic to your site.

Using FeedBurner as an Update Service

Another update service option is to use FeedBurner to publish your RSS feeds. FeedBurner (http://feedburner.com) is a service that transforms RSS feeds into new content formats and provides enhancements like quick subscribe buttons, podcast support, and advertising that can generate revenue for your site.

You can create an account with FeedBurner, provide them with the URL for your WordPress RSS feed, and they’ll give you a URL for the same RSS content that is optimized for delivery in a number of formats that will work in any reader on the desktop, Web, or on mobile devices. All subscriptions to your RSS feed through FeedBurner are tracked so you can determine how many people are subscribing and how many times they click a headline to visit your site. We’ll talk more about this feature in detail in the bonus chapter entitled “Analyzing Your Traffic” on the companion website http://buildingfindablewebsites.com.

FeedBurner helps you publicize your new content with PingShot (http://www.feedburner.com/fb/a/publishers/pingshot). PingShot does the same sort of thing as WordPress’ Update Services but they manage the comprehensive list of services to update. There’s some overlap between the services that PingShot notifies and the list we’ve added to WordPress already. If your blog publishes podcasts—MP3 files linked in blog posts that get distributed by your RSS 2.0 feed—PingShot may be useful as it notifies many podcast directory sites.

Because FeedBurner’s services are free including PingShot, which offers the convenience of handling the ping notifications for you, it’s a really great complement to the WordPress update services. We’ll see how to modify your WordPress blog to use FeedBurner for RSS distribution later in this chapter.

Remapping Your Permalink URLs

As discussed in Chapter 3 in the section entitled “Building Search Engine Friendly URLs,” the structure of your site’s URLs can influence how well search engines crawl your site and the keyword density of the page. WordPress provides some really great options to automatically generate URLs in your blog that are very search engine friendly.

In order for WordPress’s URL remapping to work you’ll need to have mod_rewrite installed on your Apache server and you’ll need to change the permissions of your .htaccess file to 666 (allows read and write access) so WordPress can write the necessary code to the file. If you’re not clear on how to set file permissions with an FTP client like WSFTP Pro or Fetch, you can check out the helpful tutorial on the WordPress site (http://codex.wordpress.org/Changing_File_Permissions).

If you’re running a Windows server with IIS you’ll want to take a look at these resources to help you set up WordPress’s URL remapping as the process is a little bit different: http://www.binaryfortress.com/wordpress-url-rewrite/, http://www.deanlee.cn/wordpress/url-rewriting-for-wordpress-under-iis/.

To configure your URL structure in the WordPress admin control panel, go to Options and choose Permalinks.

A permalink is the permanent URL for a blog post. Because blog content can be displayed in various locations—such as in categories, on the blog home page, or in an archive—a permalink is important to create one uniform location for each post.

The default URL structure for WordPress permalinks looks something like this and is not very search engine friendly:

http://example.com/?p=23

The query string on the end of the URL (?p=23) contains no keywords, will not be very usable for your audience, and can cause indexing problems for search engines. There are a few options to change this. The simplest approach is to select the “Date and name based” URL structure (see FIGURE 5.10). This will change your URLs to look something like this:

http://example.com/2007/09/03/post-title/

Figure 5.10 You can change the structure of your URLs to include the text from your blog titles to be more search engine friendly.

Image

The domain name in the URL is now followed by the date the post was published and a hyphen-delimited display of the post title text, which is much more search engine friendly.

You could also create a custom URL structure by selecting the last option, labeled “Custom, specify below” (as shown in Figure 5.10). Using WordPress’s predefined references to various post data you can construct your own URLs any way you’d like. For our custom URL we’ll change the structure to include the category name followed by the post title text. Here’s what the live URLs will look like:

http://example.com/findability/how-to-make-wordpress-more-findable/

This URL structure includes many descriptive and relevant keywords that could help improve search engine listings of the post. To change your permalink structure, add the following code to the “Custom structure” field:

/%category%/%postname%/

That’s all it takes. When you’re happy with the structure you’ve chosen, click the “Update Permalink Structure” button and WordPress will remap all of your post permalinks accordingly. You’ll find all of the post data reference codes you’ll need to build your own variations and much more detail on the subject at http://codex.wordpress.org/Using_Permalinks.

Using Categories To Archive by Topic

WordPress lets you display your posts by categories or by a chronological archive. As discussed earlier in this chapter in the section “Archive By Topics,” a topic-ordered archive is preferable because it adds keywords to your page and better suits users’ search behaviors. Using WordPress’s category listing will create the findable navigation system described.

Each time you write a post in WordPress you can assign it to a series of categories that you define. Most WordPress themes will display a category listing by default that will be automatically updated when you post.

In order to display your category navigation in your custom theme you simply use one of the template tags. If you’re using WordPress 2.1 or a more recent version you can use wp_list_categories()—a built-in WordPress template tag—to display categories with a number of customizable options. Older versions of WordPress will use wp_list_cats() to grab a category listing.

Typically, category navigation would be displayed in the sidebar of your blog. Here’s a simple example of how it might be used in the sidebar.php file of a custom theme:

<ul>
   <?php wp_list_categories('orderby=name#feed
gif'), ?>
</ul>

This example would display all categories sorted alphabetically with an RSS feed icon trailing so users can easily subscribe to each category feed. Net Results—a site shown in Figure 5.1—uses this same technique to display its categories. If you don’t want to display RSS feed links after each category, simply remove #feed_image=/images/rss.gif from the template tag.

You can learn about all of the possible category display options in the official WordPress documentation at http://codex.wordpress.org/Template_Tags/wp_list_categories.

Summarizing Posts To Direct Traffic Better

Creating a summary of each post on your home page can help users see more content in one place, and funnel traffic throughout your blog. Use the built-in the_excerpt() template tag to create home page summaries with WordPress.

This example would go on the index.php page of a custom theme where you want to display posts. This code runs a loop through the posts to display them if there are any. An if else conditional—highlighted in the following example—shows the summary of the post on the home page with a link to read more, and the full text of the post on any interior page.

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?>
</a></h2>

    <div class="date">Posted <?php the_time('M d, Y'), ?><div>

    <div class="entry">
    <?php
        if(is_home()) {
            the_excerpt();
            ?>
            <div class="readmore">
                <a href="<?php the_permalink();
            </div>
                           <?
         } else {
             the_content();
         } ?>

    </div>
</div>
<?php endwhile; ?>

You can write your own excerpt text when you create new posts. In your admin control panel in the “Write” section where you write posts, you’ll find a field labeled “Optional Excerpt” under the main post field. You can summarize your post in your own words here and it will be displayed on your home page. When users view the permalink for the post they’ll see the full text.

If you choose not to write a separate excerpt, WordPress will automatically create an excerpt by truncating the first part of your post to 55 words.

Displaying Your Most Popular Posts

Alex King’s Popularity Contest plugin (http://alexking.org/projects/wordpress/readme?project=popularity-contest) keeps track of your post, archive, and category views as well as the number of trackbacks and comments on posts so you can determine which posts are most popular. Seeing which posts your users are reading the most can help you determine what you should write about in the future. Follow up popular posts with more detail on the topic.

Once you’ve downloaded and installed the plugin following the same steps mentioned earlier in the chapter, you’ll find its preferences panel when you go to Options and choose Popularity in your admin control panel. From the preferences panel you can reset popularity counts and learn a little about the math that makes it tick.

To display a list of your most popular posts, King has created some template tag functions you could add to your sidebar.php file. The plugin is actually distributed with an example file. This first example shows the all-time most popular posts when on the home page:

<?php if (is_home()) {
<ul>
    <?php akpc_most_
</ul>
<?php } ?>

You can also show the most popular posts for the category the user is browsing:

<?php if (is_category())
<ul>
    <?php akpc_most_
</ul>
<?php } ?>

Or you can show the most popular posts for the past month when users are browsing your blog by the date archive:

<?php if (is_day()) { ?>
<ul>
    <?php akpc_most_popular
</ul>
<?php } ?>

WordPress’s caching features, which we’ll discuss later in this chapter, will cause conflicts with Popularity Contest. Because cached WordPress pages won’t trigger the plugin’s tracking system, the two cannot be used together.

Displaying Your Most Recent Posts

Displaying your recent posts concisely in an area separate from your most recent post can help repeat visitors to your site easily locate what’s new since their last visit. In Figure 5.4, we saw how the home page of Dave Shea’s blog (http://mezzoblue.com) displays his six most recent posts at the top of the page and an excerpt from the most recent in the middle.

To create a similar home page structure, we can simply modify index.php in your custom theme just like the earlier example from the section “Summarizing Posts To Direct Traffic Better.” Adding the query_posts() function before running the post display loop allows you to grab just one post, which is by default the latest one. The highlighted code illustrates the simple modification:

<?php query_posts('posts_per_page=1'), if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink()"><?php the_title(); ?>
</a></h2>

    <div class="date">Posted <?php the_time('M d, Y'), ?></div>

    <div class="entry">
    <?php
        if(is_home()) {
          the_excerpt();
           ?>
           <div class="readmore">
               <a href="<?php the_permalink(); ?>">read more</a>
           </div>
        <?
        } else {
          the_content();
        } ?>
    </div>
</div>
<?php endwhile; ?>

After the loop you can grab five recent posts, excluding the newest one, using the get_posts() function and display the titles in an unordered list with an id so it can be easily styled with CSS:

<ul id="recent-posts">
<?php $posts = get_posts(’numberposts=5&offset=1’);
foreach ($posts as $post) : ?>
  <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?>
</a></li>
<?php endforeach; ?>
</ul>

Notice that the get_posts()function defines the number of posts to grab, and offsets the list by one to exclude the most recent one.

This concise home page structure will help your visitors get an overview of your content so they can quickly explore the topics most relevant to them. You could also use the same code to pull recent posts and display them at the bottom of your search results pages or on your custom 404 pages to help people find what they’re looking for, or at least something else of interest.

Promoting and Tracking RSS Subscriptions with FeedBurner

WordPress publishes RSS feeds by default, but as mentioned earlier in this chapter in the section “Defining Update Services,” letting FeedBurner distribute your feeds provides a number of great features beyond those WordPress offers. Subscription tracking, automatic update service notification, and advertising revenue streams are just a few of the valuable features FeedBurner offers.

Using the FeedSmith Plugin

FeedSmith (http://www.feedburner.com/fb/a/help/wordpress_quickstart), a popular plugin created by Steve Smith (http://orderedlist.com) and recently taken over by the FeedBurner folks, routes all WordPress RSS requests to your FeedBurner account so you can get detailed information about how many people are subscribing and how often they are clicking on headlines to visit your site.

After you install the plugin, go to your admin control panel, navigate to Options, and choose FeedBurner FeedSmith. Follow the directions to create your FeedBurner feeds. FeedSmith can handle both your main RSS feed with all of your posts and your comments feed.

Encouraging Social Exchanges of Your Content

Earlier in this chapter, in the section “Encourage Users To Share Your Content with Others,” you learned that social bookmarking and news systems like Delicious, Magnolia, and Digg can really help you build traffic to your site by letting your users tell others about it. You can encourage your users to bookmark your site or digg it using a WordPress plugin created by Peter Harkins called Sociable (http://push.cx/sociable).

Sociable will automatically add a series of links under each post to some of the most popular social networking sites on the Web. Figure 5.7 illustrates what Sociable’s output looks like under a blog post.

When you’ve installed Sociable, navigate to its preferences panel located in Options > Sociable. You can enable or disable links to any of the 61 social networking systems listed and customize the label that will appear next to them.

To keep track of the number of times your blog posts were submitted to Digg or bookmarked in Delicious, you can install John Lawrence’s free plugin called Socialist (http://www.johnlawrence.net/index.php/2007/02/12/sociallist-for-wordpress/). Once Socialist is installed it creates a new tab at the top of your admin control panel dashboard. From the Socialist tab you can see just how many people are bookmarking or Digging your site (see FIGURE 5.11).

Figure 5.11 Socialist is a free WordPress plugin created by John Lawrence that allows you to track the number of Digg submissions and Delicious bookmarks your blog is receiving.

Image

Displaying Related Posts

Showing related posts on individual blog pages is a great way to keep your users on your site longer and keep old posts from being lost in your archives. Although there are a number of good plugins that will automate the task, Rob Marsh has created an exceptionally good one called Similar Posts (http://rmarsh.com/plugins/similar-posts/).

Once you’ve installed the plugin just place this simple code in the sidebar.php file or your custom theme or anywhere else you’d like them displayed.

<ul><?php similar_posts(); ?></ul>

Go to Options and choose Similar Posts to define how many related posts you’d like to display. You can also fine-tune the way it generates its suggestions.

Automatically Generating an XML Sitemap

The major search engines including Yahoo!, Google, and MSN have recently cooperated on the development of a standard XML sitemap format (http://sitemaps.org) that allows webmasters to communicate the structure of their site to search engines for efficient and complete indexing. The sitemaps XML file gets created either manually or with a tool that can scan your site and build it for you. You then save the file as sitemap.xml in the web root directory of your server and let search engines know where to find it. We’ll examine this topic further and how to submit your sitemap.xml file to search engines in the bonus chapter entitled “Free Search Engine Tools and Services” on the companion website http://buildingfindablewebsites.com.

Using the Google Sitemap Generator Plugin

Blogs tend to have very large structures, which makes creating an XML sitemap tedious without some tool to automate the process. Arne Brachhold has created a really useful WordPress plugin called Google Sitemap Generator (http://www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final) that builds a sitemap.xml file for you each time you post to your blog. It even pings Google with the location of the file when it’s been updated.

Once you’ve installed the plugin it will create a preferences panel that you’ll find when you go to Options and choose Sitemap. That’s where you can configure it and manually rebuild the sitemap.xml file. You’ll need to click the “Rebuild Sitemap” button once when you’ve first installed the plugin to generate the sitemap.xml file on your server. When you make future posts it will automatically append new URLs to the file for you.

Image
Dragon Design offers a great WordPress plugin (http://www.dragondesign.com/articles/sitemap-generator-plugin-for-wordpress/) that will generate a full-page link sitemap of all your blog posts.

It also lets you include in the sitemap.xml file other pages in your site that aren’t part of your blog to create a comprehensive listing of your site’s entire structure. By default the plugin will automatically ping Google when you write new posts to let them know the sitemap.xml file has changed, but you can disable this option if you like.

Other Handy SEO Plugins for WordPress

There are so many SEO plugins for WordPress that it’s daunting to try to sift through them all. Most of the SEO plugins primarily manipulate your title tags or meta tags, and sometimes do both at the same time. The benefit of these plugins is that they can place the same content in your <title> that is in your post heading, which can create strong keyword prominence in your post pages.

Using the All in One SEO Plugin

One plugin seems to do all of the things the others do individually. It’s aptly named All in One SEO (http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/). One of its nicest features is the ability to create unique <title> and meta tags for your home, archive, categories, and permalink pages.

When you’ve downloaded and installed the plugin you’ll notice on the Write page where you author your posts three new fields added where you can manually define the text for the <title> tag, meta keywords, and a meta description for the post. When you’re done writing, simply cull important keywords and phrases from your post and fill them in. It offers impressive control over getting your keywords into important places in your pages.

Meta keywords content is not such a huge SEO asset anymore as we saw in Chapter 2 in the section “The Myth of Meta: the Good, the Bad, and the Ugly.” The major search engines do not view the meta keywords tag because of the very sketchy use of it in the past. The <title> tag is an exceptionally important place for keywords, and the meta description generates traffic by describing on search engines results pages what a page is about. A custom meta description for a post could better inform users about the content on the page and encourage them to visit your site.

You can control the structure of your <title> tags for categories, archives, home, and permalink pages very precisely when you go to Options and choose All in One SEO. In the preferences panel for All in One SEO you can also choose to have a <meta name=“robots” content=“noindex,follow” /> automatically added to the head tag of your categories, and archive pages to prevent search engines from indexing duplicated content.

Image
If you are using WordPress’s pages feature to add additional pages to your site, you can modify the blog search feature to include all page content using the search pages plugin (http://www.internetofficer.com/wordpress/search-pages/).

The All in One SEO plugin really lives up to its name offering a lot of good SEO features for your WordPress blog.

Tagging Your Posts

As we discovered in Chapter 2 in the section “Tagging Content with rel-tag,” a tag is a keyword that serves as meta data used to describe blog posts or other content on a website. The more descriptive information that is associated with your content, the better users and applications will be able to locate it. Though tags often link to other services like Technorati where related information that shares the same tag can be found, WordPress tags link to related posts within the blog.

Since the release of WordPress 2.3, tagging is a native feature. Directly under the text field where you write and edit blog posts you’ll find a field where you can add a series of descriptive tags separated by commas. These tags will be displayed after each post, and will be added to a tag cloud. As FIGURE 5.12 shows, a tag cloud is simply a collection of all tags throughout a site. The popularity of each tag is visible by the scale of its type. It’s a convenient way for users to explore vast amounts of content by topic and get an overview of the type of content your blog contains.

Figure 5.12 The popular photo-sharing Web application Flickr (http://flickkr.com) provides a tag cloud navigation system that illustrates the most popular tags applied to photos. It makes exploring photo collections convenient and easy.

Image

Displaying Post Tags

Although you can tag your posts directly as you write them, you’ll need to make some minor modifications to your theme to display them. To display tags next to your posts use the_tags(). This template tag function receives three parameters. The first and last are where you can declare any HTML or text you’d like to have written into the page before and after the tags respectively. The second parameter is the character you’d like to use to separate tags. Here’s a simple example you could add to your theme template files anywhere you want to show your tags:

<?php the_tags('Tags:', ', ', '<br />);?>

You can see more code examples and learn a little more about the_tags() in the WordPress documentation (http://codex.wordpress.org/Template_Tags/the_tags).

Showing a tag cloud not only offers users a convenient way to browse your content by keywords, but it also communicates which tags are the most popular by the scale of the text. The size of each tag is determined by how many times that particular tag has been assigned to posts. You can display a tag cloud and configure the font sizes for the varying levels of tag popularity using the wp_tag_cloud() function.

<?php if ( function_exists('wp_tag_cloud') ) : >
<h2>Popular Tags</h2>
<ul>
    <?php wp_tag_cloud('smallest=10&largest=24'), >
</ul>
<?php endif; >

Notice that the sizes of the smallest and largest tags are defined within the function call. Because wp_tag_cloud() offers a great deal of display control, you could display a tag cloud on an entire page or scaled down to fit into smaller spaces. See the documentation on this function for more detailed display options (http://codex.wordpress.org/Template_Tags/wp_tag_cloud).

Optimizing Content Delivery with Caching

If your site gets Dugg and suddenly you’ve got thousands of people on your blog, caching your WordPress pages can help ensure that your site doesn’t go down. Ricardo Galli has created a sophisticated caching plugin called WP-Cache (http://mnm.uib.es/gallir/wp-cache-2/) that handles the entire configuration for you.

Before installing WP-Cache, be sure to disable WordPress’s Gzip Compression option by going to Options and choosing Reading. Upload and install the plugin, then go to Options and choose WP-Cache and the plugin will guide you through the setup process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset