My sidebar widget code in functions.php looks like this...
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Home Sidebar',
'id' => 'home-sidebar-widget',
'before_widget' => '<div class="menu side %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="sidebarTitle">',
'after_title' => '</h4>',
));
Which creates this markup on the site...
<div class="menu side widget_text">
<h4>widget 1 title</h4>
<div class="textwidget">Lorem ipsum dolor sit amet</div>
</div>
<div class="menu side widget_text">
<h4>widget 2 title</h4>
<div class="textwidget">Lorem ipsum dolor sit amet</div>
</div>
Here's what I need (just adding a number to the class collection)...
<div class="menu side s1 widget_text">
<h4>widget 1 title</h4>
<div class="textwidget">Lorem ipsum dolor sit amet</div>
</div>
<div class="menu side s2 widget_text">
<h4>widget 2 title</h4>
<div class="textwidget">Lorem ipsum dolor sit amet</div>
</div>
I would like to add a count variable so that each sidebar gets a number that I can then use for css targeting. How?
<div class="menu side widget_1 widget_text">