Get widget instance with wp_options
-
Hi again,
I have a widget with wp_options name: my_widget.
Within my widget file I can retrieve a value like this:
if ( !empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title']; }
But how do I retrieve this value outside the widget file?
I’ve read something about get_option, but don’t understand how to get a single value from my my_widget option, such as: $instance[‘title’]
Thanks in advance!!
Guido
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Get widget instance with wp_options’ is closed to new replies.