Hello. I'm fairly new to WP and I'm trying to find a way to have my widgets in my sidebar to have their own div.
In my functions.php, in the line
'before_widget' => '<div id="%2$s">',
I want to be able to assign a number other than %2$s. I don't know if this is possible but I want to count how many active widgets are. Based on that number I then want to create a loop to assign a <div id="feature".$i> on that line so each widget has a div identified with a different number. I apply a different css format to each widget.
Is there a variable, constant, function or something for that? I need a number and not just the name of the widget as unique identifier. The reason for that is that I need the css format to appear in a specific order, and widgets can be displayed in any order, which is why I can't use "%2$s".
Any help will be greatly appreciated.