Some functions in this context may require a $post_id
passed as param, at least have_rows()
and get_field()
, e.g.:
while ( have_rows( 'sponsors', 'widget_gallerysponsor_widget' ) ) : the_row();
In your case the location is set to widget, so the $post_id
value should be widget_{$widget_id}
. See this documentation page for details.