Hi @geoffmuskett
Change the_sub_field()
method and use get_sub_field()
instead. the_sub_field()
method will display the value whereas get_sub_field()
method will get the value. Change your code to the following:
if( in_array( 'car', get_sub_field('tyres_available') ) ) {
echo 'some html';
}
Check out the docs for more information: http://www.advancedcustomfields.com/resources/get_sub_field/