- This topic is empty.
- The forum ‘Back End’ is closed to new topics and replies.
I have an event timetable. In the back end you can specify whether the event type is a ‘Presentation, Workshop or Coffee Break. I want each of these in the front end to display as icons not words.
This is the basic code I have for the backend.
<?php the_sub_field('event_type'); ?>
Does anyone know what I need to add to convert the words into icons? (hope this isn’t confusing!). Many thanks.
You could do something like this to convert the types into class names: http://stackoverflow.com/questions/11330480/strip-php-variable-replace-white-spaces-with-dashes
Then just go something like:
<span class="icon <?php echo $eventType; ?>"></span>
Thanks TheDoc – I’ll give that a go!