Home › Forums › Gutenberg › no_fields_assigned_message › Reply To: no_fields_assigned_message
Here are two additions in case you a) want to have a unified message for all ACF blocks without ACF fields or b) want the message to disappear completely.
// ACF Blocks: Alter message for all ACF blocks that contain no ACF fields
function no_fields_message($message) {
$message = __('No fields for this block', 'projectname');
return $message;
}
add_filter ('acf/blocks/no_fields_assigned_message', 'no_fields_message', 10, 2);
// ACF Blocks: Remove no-fields message for all ACB blocks without ACF fields
add_filter( 'acf/blocks/no_fields_assigned_message', '__return_empty_string' );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.