my code was only to replace the part between the <li>
tags
<li><?php
if (get_sub_field('show_the_link')) {
?><a href="<?php the_sub_field('work_link'); ?>"> <?php the_sub_field('work_title'); ?></a><?php
} else {
the_sub_field('work_title');
}
?></li>