Support » Plugins » Widgets with Effects

  • Hey There,

    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:
    <div id="widget-1">

    Widget 2;

    <div id="widget-2">

    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..

    </div>

    Does anyone have any ideas on how I could do this?

    Many Thanks,
    Oli

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Widgets with Effects’ is closed to new replies.