Use redux-framework values in custom made wiget

Is it possible to use redux values with echo in a custom made widget?

my-widget.php is included in function.php with global $opt_name defined in top of fuction.php

Read More

Want to use:

echo $opt_name['very-nice-input'];

Excerpt from my-widget.php showing front-end display of widget.

echo $args['before_widget'];
if ( ! empty( $instance['title'] ) ) {
    echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
}
    echo $opt_name['very-nice-input'];
    echo $args['after_widget'];
}

Related posts

Leave a Reply

1 comment

  1. Lead dev of Redux here.

    Yes, but you may need to do your own get_option(‘OPT_NAME’) if the values haven’t been set yet. Give it a try by declaring your global $OPT_NAME variable. If it’s empty, then do a get_option.

    🙂