Same for me…
This happens since ACF Version 5.6.6 because ACF changed the DOM and the <p class="acfw-no-acf">
is no longer a sibling of the "div[id*='_acf_widget_'] .acf-field"
as it would be searched in the acf-widgets.js
If you change the acf-widgets.js
to this, it works on ACF 5.6.6 and newer as well:
function acfw(){
var el = jQuery("div[id*='_acf_widget_'] .acf-field");
var num = 0;
num = el.length;
if ( num > 0 ){
var remove = el.closest('.widget-content').children('.acfw-no-acf');
remove.attr('data-display', 'none');
}
}
function acfw_remove_fields(){
jQuery('.widget .acf-field').remove();
}
jQuery(document).ready( acfw );