this one has been getting me for a while. At the moment I have a repeater field with Advanced Custom Fields:
<ul id="servicelist" class="clearfix">
<?php if(get_field('homepage_service')): ?>
<?php while(the_repeater_field('homepage_service')): ?>
<li><img src="<?php the_sub_field('service_image'); ?>" />
<?php endwhile; ?>
<?php endif; ?>
</ul>
What I'm trying to do is apply a class to the last item generated by this... is there a way (or a function) to give a class to every last list item on a WP site?
Thanks
<li>
! Would selecting#servicelist li:last-child
not be easier?