I'm trying to expand my theme (it is already compatible with widgets), that each widget is contained in a div with a unique ID. For example, widget 1:
And so on. So, what I would ideally like to is assign a variable, like $widgetcount and add one to it just before each widget. Then after that to display the value of that variable in the div.
I presume the code would look something like this:
before all widgets..
<?php $widgetcount = 0; ?>
before each widget..<br />
<?php $widgetcount +1; ?><div id="widget=<?php echo $widgetcount; ?>">
and then after each..
Does anyone have any ideas on how I could do this?