WordPress.org

Ready to get started?Download WordPress

Forums

Widgets: Setting $instance variables in widget() (1 post)

  1. Mads Phikamphon
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Mads Phikamphon
  • This topic is not resolved
  • WordPress version: 3.4.2