title: Add class to Wordpress sidebar navigation lists
body: <p>I'm just wondering if there's a way to add a class to any navigation lists for things like sub-pages, categories, archives, meta?</p>
  
  <p>I can't find anywhere in my templates to add a class as I guess it's all autogenerated?</p>
  
  <p>My parent theme (html5blank) has a section of code (below) where this is referenced but I think it targets all lists in the sidebar...</p>
  
  <pre><code>if (function_exists('register_sidebar'))
  {
      // Define Sidebar Widget Area 1
      register_sidebar(array(
          'name' =&gt; __('Widget Area 1', 'html5blank'),
          'description' =&gt; __('Description for this widget-area...', 'html5blank'),
          'id' =&gt; 'widget-area-1',
          'before_widget' =&gt; '&lt;div id="%1$s" class="%2$s"&gt;',
          'after_widget' =&gt; '&lt;/div&gt;',
          'before_title' =&gt; '&lt;h3&gt;',
          'after_title' =&gt; '&lt;/h3&gt;'
      ));
  
      // Define Sidebar Widget Area 2
      register_sidebar(array(
          'name' =&gt; __('Widget Area 2', 'html5blank'),
          'description' =&gt; __('Description for this widget-area...', 'html5blank'),
          'id' =&gt; 'widget-area-2',
          'before_widget' =&gt; '&lt;div id="%1$s" class="%2$s"&gt;',
          'after_widget' =&gt; '&lt;/div&gt;',
          'before_title' =&gt; '&lt;h3&gt;',
          'after_title' =&gt; '&lt;/h3&gt;'
      ));
  }
  </code></pre>
  
  <p>I realised I can add a class to a parent div by amending the <code>before_widget</code> line to read something like:</p>
  
  <pre><code>'before_widget' =&gt; '&lt;div id="%1$s" class="%2$s CUSTOM-CLASS-HERE"&gt;',
  </code></pre>
  
  <p>That does add a class but I still thing it'll be added to any and every widget that's added to the sidebar?</p>
  
  <p>Presumably that will mean any widget that contains a <code>ul</code> will inherit styles applied to that class, which will break the widget's appearance?</p>
  
  <p>Hope someone can help with this :)</p>