I like to add a helper function to my themes…
if ( function_exists( 'get_field' ) ) {
function get_group_field( string $group, string $field, $post_id = 0 ) {
$group_data = get_field( $group, $post_id );
if ( is_array( $group_data ) && array_key_exists( $field, $group_data ) ) {
return $group_data[ $field ];
}
return null;
}
}
Usage: <?php echo get_group_field( 'album_group', 'album_information' ); ?>
@hube2 Thank you. However, this question is in regards to ACF not any other plugins.
I feel the DB search and replace tool you suggested is overkill for such a simple task and wouldn’t solve my scenario as I need serialized data to be altered, not ignored.