redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

How to get option values inside the admin area

Open mstoic opened this issue 11 years ago • 3 comments

Hi, I wanted to display a meta box only if user has enabled it in the redux settings. Is it possible? Because I am not getting redux values in the WP dashboard.

mstoic avatar Sep 10 '15 08:09 mstoic

Run: Redux::init('opt_name') to get Redux to run before the init hook, and work within the functions.php file. ;)

dovy avatar Sep 10 '15 14:09 dovy

sorry to comment on this closed topic, dovy you mentioned to add Redux::init('opt_name') so we can use values in functions.php where should this be added?

distincthq avatar Oct 28 '15 14:10 distincthq

Before you try to use the global variable. ;)

Basically Redux is delayed loading until the init hook to ensure all things load. If you need the data sooner you can a) do your own get_option for previously set options b) force Redux to load. Make sure all your configuration has loaded first.

dovy avatar Oct 28 '15 15:10 dovy