Suggestion for Locations widget
-
I wanted to style specific items in the list of locations, generated by the Locations widget, but there was no easy way to select them (li:nth-child(16) was not very manageable!). There didn’t appear to be an option with the plugin settings GUI for this either.
So I added a CSS class to the output by editing widgets/em-locations.php:
echo '<li class="location-' . $location->location_slug .'">'. $location->output($instance['format']) .'</li>';
… which has done the trick. Is there an appropriate means of asking whether this (or something better) could be incorporated into the plugin? If not, hope this is handy for anyone else trying to achieve the same thing.
- The topic ‘Suggestion for Locations widget’ is closed to new replies.