Customize Your Word Press Blog – displaying ‘recent posts’

You may have seen many blogs with “recent comment” or recent posts” added to the sidebar, however many templates don’t have this feature, including mine.

What’s the purpose of adding “recent posts” to your blog?

1. Allows visitors to immediately see what you have posted in the last few days and therefore don’t have to wade through your blog to find them.

2. If your recent posts are all related to the same topic the visitor can quickly choose what he or she wants to read.

3. It helps you remember what you’ve written recently so you don’t end up repeating yourself.

4. The text links to your post will help the search engines to spider your blog, since they love spidering text. Try to include your main keywords in these links that are related to the topics you are discussing.

How to create “recent posts” in your blog’s sidebar.

1. Add this line of code to your sidebar:


<code>
<?php get_archives('postbypost', '10', 'custom', '', '<br />'); ?>
</code>

In my case I enclosed it with some CSS (cascading style sheets) to have it blend in with the rest of the site. ie


div class="box-1">
            <div class="box-h">
              <h4 id="h-recent">Recent Posts</h4>
            </div>
<?php get_archives('postbypost', '10', 'custom', '', '<br />'); ?>
</div>

2. The number ’10’ can be adjusted if needed. Just change it to the appropriate number of posts you want displayed.

TIP
Your blog may already have “recent posts” displayed. To change this setting, just go to the “Reading Options” from the Options >> Reading >> Syndication Feeds >> Show the most recent: change this number to whatever you want.

That’s it!

Speak Your Mind

*