A sideblog, or asides as they’re sometimes called, is a great addition to a blog. It allows you to post short mini-posts into a spot in your sidebar.
Have you just hit the Digg.com main page? Give your readers a heads up. Did you just think of an idea your users may want to here? Sideblog it! Sideblogs are great for sharing links as well as posting updates. If you need more convincing, read Why You Should Use A Sideblog.
Let Michael Martin convince you to use a sideblog. This post is about setting one up.
The Plugin
- Download and install the WordPress Sideblog Plugin.
- Create a new category called “Sideblog” or something of the sort.
- Login to your WordPress Admin and go to Options -> Sideblog.
- Check-mark the Sideblog category and check the box marked “Exclude from feeds.” Set the number of entries you want displayed, then click “Update Sideblog Options”.
- Add
<ul><?php sideblog('categoryslug'); ?></ul>
to your sidebar template where you want the sideblog to appear. - Style the sideblog however you want, and making use of the “Display Format” box on the Options -> Sideblog page and CSS if necessary.
Functions.php
WordPress themes are allowed to have a cool little file called functions.php. I could rave about it for hours, but I doubt you want to stick around for that. If you don’t know what functions.php is, read about it at WordPress.org.
Once the Sideblog Plugin is installed, open-up your theme’s functions.php file. If there isn’t one, create it. Just name a plain-text file functions.php and add the “begin/end PHP block” tags:
<?php
?>
Once you have your functions file ready, add the following code between the PHP tags. Be sure to replace 75 with the id for your Sideblog category.
function killAsides($query) {
if ($query->is_archive) {
$query->set('cat','-75');
}
return $query;
}
add_filter('pre_get_posts','killAsides');
What does it do? It makes sure your Sideblog entries don’t appear on date-based archive pages (the plugin removes them from the index and RSS feed). You don’t want all your short, two-sentence posts cluttering them up, do you? If you do, you can skip this step. It’s a matter of preference.
Customize Single.php
Your sideblog entries are puny. Do they really need an entire permalink page all to themselves? If you want, you can remove parts of the single.php template for sideblog entries. Suppose you want to take the comments and comment form out. All you have to do is take the line
<?php comments_template(); ?>
and change it to
.
<?php if (!in_category('cat_id')) { ?><?php comments_template(); ?><?php } ?>
You need to replace cat_id with the numerical category id, of course.
Stop the Bots
Google doesn’t like pages with “little original content.” Basically the post pages of the sideblog entries have a couple of sentences of content…and the rest is the blog template. You end up with the header, sidebar, and about ten words of original content. The header and sidebar appear on every other page on your site…not good.
What can you do? You can tell search robots to ignore the sideblog entry pages using this code (thanks to Michael Martin):
<?php if(is_category('75') || in_category('75')) { ?>
<meta name="robots" content="noindex, nofollow">
<? } ?>
Just add it in to your blog’s header, replacing 75 with your category id again.
Search engines will totally ignore the sideblog permalink pages. Note that search engines will still follow sideblog links as your Sideblog appears in your sidebar, and in the category archives (www.yourblog.com/category/sideblogcategory).
Add a Feed
You’ll probably want to offer your readers a feed for the Sideblog. WordPress generates one automatically (even if it doesn’t advertise it). It’s accessible at www.yourblog.com/category/sideblogcategory/feed/. If you’re not using “pretty permalinks,” then you may append ?feed=rss2 to the category URL. Feel free to use Feedburner with the RSS feed.
Enjoy your sideblog!
Pingback: Post “Shorts Posts” with the Sideblog Plugin at WordPress Themes, WordPress Plugins, Blog Tips, WordPress Optimizations >> WPthemesplugin.com
Pingback: News » Post “Shorts Posts” with the Sideblog Plugin
Pingback: BlogUpper | New Micro Blog