Posts RSS Comments RSS

Got Widgetized

I found out a couple of days ago that the theme I am using is not widget ready. Its pretty simple to find out, just go to Presentation tab in your Admin page and then click on Widgets tab. If your theme is widget ready, you will see the widget layout, page, if the theme is not ready you will see this:

You are seeing this message because the theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.

The instructions were pretty easy to follow and now my theme is widget ready.

If you use Akon theme for WordPress this is all you need to do. The source of info is here, but I just wanted to give simpler instructions for the users of this particular theme.

  • Open functions.php in the ‘Akon’ theme folder and paste the following at the very top outside the <?php> tag:

    <?php
    if ( function_exists(’register_sidebar’) )
    register_sidebar(array(
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<div class=”title”>’,
    ‘after_title’ => ‘</div>’,
    ));
    ?>

  • Open sidebar.php in the same folder and paste this to where you want your widgets to show.

    <div class=”column”>
    <?php if ( !function_exists(’dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>
    <?php endif; ?>
    </div>

    Notice that this is using ‘column’ class. If you changed your style sheet then edit the tag accordingly.

Now you can go and test this out. Note that you will need to mess around with CSS to get the widgets to match the look of your site.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Technorati

3 responses so far

3 Responses to “Got Widgetized”

  1. cmanon Aug 9th 2007 at 11:23 am

    Hey Paul,

    Great site. I was trying this code out but was getting the error:

    Parse error: parse error, unexpected T_CLASS, expecting ‘)’ in /homepages/7/d144399094/htdocs/wp-content/themes/Akon/functions.php on line 7

    seems like it’s missing a parenthesis or something but couldn’t figure out where

    any ideas?

    Thanks!

  2. cmanon Aug 9th 2007 at 12:03 pm

    Hey again,

    Please disregard that last message. WP just didn’t like a direct copy and paste of the code.

    All the best

  3. Paul Benetison Aug 9th 2007 at 12:05 pm

    Cool man, glad the trick worked for you.

Leave a Reply