Support

Account

Home Forums General Issues ACF and Widgets Reply To: ACF and Widgets

  • This is a great feature! I don’t understand how to retrieve the saved values and display them on the front-end. I tried get_field in the widget function of the widget class but that doesn’t work. Anyone has an idea how to retrieve the acf data saved to widgets?

    EDIT:

    Well, I think I found a solution. This is how I did it in the widget function of the widget class:

    $test_value = get_field('test', 'widget_' . $args['widget_id']);