exceptional sites to your budget

Technology Blog »

Give your page wings: the WordPress Side Content Plugin

I wrote this plugin to provide similar functionality to the Drupal Side Content module. It makes it easy to have unique sidebar content on any page. Yes, it gives your page wings – or its own widgets, anyway.

If you see any PHP errors on activating the plugin then the most likely cause is that you are using PHP 4. This plugin requires PHP 5.

Update 15 November 2009: Since our latest redesign this site no longer uses the Side Content plugin. If you are using it, I’d very much appreciate links that I can post here to illustrate this article.

Download the plugin.

Here’s how to use it:

  1. Install and activate the plugin in the normal way.
  2. On the settings page for Side Content, enter the names for your widgets, one per line. (These will also be the names of your custom fields). Save your changes.
  3. On the Design->Widgets page, you’ll now see your widgets listed and you’ll be able to position them as you like in your sidebar(s).
  4. Edit a page (or post) for which you want one or more sidebar content widgets. The widget entry areas will be found in a sub panel headed “Side Content Widgets”. In each area enter the HTML (including any heading) you wish to appear. The widget content will be saved along with the rest of the page or post.
  5. Tip: use the HTML editor for the page to create content for a field, then (in HTML mode) cut and paste it into the custom field value area.
  6. Note: it now works with both pages and blog posts.
  7. Note: as of release 0.7 the plugin includes support for the new WordPress shortcode API.
  8. Note: as of release 0.6 the plugin is compatible with WordPress-MU.
  9. Note: as of release 0.5 it has its own subpanel on the edit page.

Although the plugin does not require any theme changes to be made, it does provide a useful API function that can be used in templates to adjust page layout if required. To call it, code as follows:


if(function_exists('the_side_content')) {
if(the_side_content()->has_widgets()) {
// template adjustments for side content widgets
}
// alternatively, you can test for a particular widget by name
if(the_side_content()->has_widgets('mywidget')) {
// template adjustments for side content widget 'mywidget'
}
}

Note that this plugin requires PHP5. Compatible with WP 2.5 through 2.8.1.

Download the plugin.

Share this post:
  • Digg
  • Technorati
  • del.icio.us
  • StumbleUpon
  • Facebook
  • Sphinn
  • TwitThis

123 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. January 3, 2012 1:09 pm

    Ted, thanks for your comments. Glad you got the plugin working in the end. I don’t have much time to work on it right now, so it’s good to hear it’s still working with newer versions of WordPress.

« Older Comments

Links to this post

  1. April 28, 2009 7:44 pm: Wordpress als CMS « augenschoner

Some HTML is OK

or, reply to this post via trackback.