Recently I was asked to write a 3 page tutorial for Net Mag’s Ultimate Guide to WordPress Volume Two. I was approached because of my work building large WordPress websites sites and extending what can be done with the use of advanced custom fields.
I chose to build and write about a small website for a rubber duck racing league. A simple, fun premise that would allow quite a lot of extra functionality.
The website used the twentyfifteen theme with a child theme associated with it so that I could easily make changes. And two custom post types:- The Races and The Ducks with a number of custom fields associated with each.
When you visited the website you were presented with a list of fixtures for that season, when you clicked on each you were given full details of that race and a list of the ducks that would be in the race. Each duck could then be clicked on to give more information (i.e. stats, bio etc. much like any other sporting event features its contestants)
And then to make things a little more difficult, there was a small calculator to work out what your winnings would be, if you wanted to have a flutter, based on odds given to each duck and how much you would like to gamble.
Each race had additional custom fields built in for details like the race date, time and location. As well as a relational repeater field that allowed you to select the ducks that would be in the race from the duck post type, rather than manually adding them all of the time, and also setting the odds for each duck in that race.
This was a really fun side project to do and a great way to show the power of advanced custom fields. If I had had more time with it I would have jazzed the site up a little, added a google map for the location of each race, a widget showing the next race in the season based on the current date etc etc. The options for this really were endless.
If you would like to view the website I created for this tutorial, you can do so here: http://www.kb-client-area.co.uk/ducks/
All of the source code for it can be found here: https://github.com/kirstyburgoine/DuckRaces