WordPress.org

Support

Support » Plugins and Hacks » Hacks » Widgets: Setting $instance variables in widget()

Widgets: Setting $instance variables in widget()

  • Hi,

    I have a widget where I need to set the value of an instance variable in the widget() function.

    Is that possible? If it is, how should I do it?

    I have no problems setting the value in update(), but my code doesn’t work when I try to put it in widget()

    The code is simple:
    $instance[‘title’] = ‘My title’;

    Thanks a lot,
    Mads

  • The topic ‘Widgets: Setting $instance variables in widget()’ is closed to new replies.
Skip to toolbar