Support

Account

Home Forums General Issues Link field values (checkbox) with url-s? Reply To: Link field values (checkbox) with url-s?

  • I try to remove some lines and done this but got 2 problems.
    1st is no commas and space in between text
    2nd is the last field comes 2 times

    Screenshot: https://prnt.sc/low0fl

    <?php
    	$field_value = get_field('job_qualification');
    	$field_object = get_field_object('job_qualification');
    	$services = $field_object['choices'];
    
    		foreach($services as $value => $label){ 
    
    		if (in_array($value, $field_value)) {
         	$servicesList = "<a target='_blank' href='https://jobsalert.pk/edu/$value'>$label</a>";
    }?>
    <?php echo str_replace(',', ' , ', $servicesList); ?>
    <?php } ?>