The following:
class="<?php the_field('icon','service-category_'.$term->term_id) ?>">
makes it:
class="icon-ico-1"
But when I do the following:
<?php $iconpath = 'images/'.the_field('icon','service-category_'.$term->term_id).'.svg.php'; ?>
It doesn't calculate the 'icon-ico-1'
and instead gives the following path:
images/.svg.php
Which is obviously not correct. I want it to be:
images/icon-ico-1.svg.php