Is there a way to use acf on widgets_init hook ?
-
Hi there,
I’m triyng to make something like “sidebar creation” from acf (options page and repeater field)..
The problem is that in functions.php get_field returns false and i can’t get the values from options page and repeater field..
Mey be there’s anothere solution on how to get repeater field from options page ?
I’m trying:function unit_widgets_init() { echo '<pre>'; var_dump(get_field('repeater_field','options')); echo '</pre>'; } add_action( 'widgets_init', 'unit_widgets_init' );
and it gives false
On front end everithing is working fine.
Is there a solution ?
- The topic ‘Is there a way to use acf on widgets_init hook ?’ is closed to new replies.