You’ll have to show more of the relevant code, but, to begin with, if you want to check for the availability of a ‘preparation_time’ ACF value, use
if ( get_field( 'preparation_time' ) ) : // get_field(), not the_field()
As the ACF docs put it, the_field( 'field' )
is the same as echo get_field( 'field' )
– so wouldn’t return true or false, but instead simply print (if you get to it).
I’d probably write it
if ( get_field( 'preparation_time' ) ) {
echo get_field( 'preparation_time' ) .
' 40 MINUTES PREP/COOK' ;
}
But no guarantees, since I don’t know the context.