Can't seem to widgetize a sidebar for a custom Wordpress theme

admin

Administrator
Staff member
I was brought in to make a quick Wordpress theme for a client's existing site. Using the existing site's CSS and JS, and skeleton HTML, I was able to get the theme working in virtually every way except some. For starters, I can't seem to 'widgetize' the sidebar.

The HTML for the sidebar, before attempting to register for widgets, was as follows:

Code:
<div class="wms-column wms-column-nav">
    <div class="wms-column-nav-body">
      <h2><a href="/">Blog</a></h2>
    </div>
</div>

Bear in mind that I can add html inside of the inner div, but I cannot change the two outer divs. They must remain.

After reading <a href="http://codex.wordpress.org/Widgetizing_Themes" rel="nofollow">http://codex.wordpress.org/Widgetizing_Themes</a> and trying several examples, I get nothing but errors. Naturally, the widget area therefore refuses to show in Dashboard > Appearances.

How do I convert the above code to function as a widget-accepting sidebar? Is having id="sidebar" necessary? And are titles needed? The Codex page seems to imply the way you format the titles depends on the overall approach (example: divs vs. lists). The impression I am getting is that you're making a template that the widgets use over and over to kick out content. I figured you just were telling WP where to put widgets (and all of their content / format / intricacies were handling in the widget's code).