Starting
I started this project by looking into the worpdress sites set up as via its admin section some parts of information can be inputted and used on the homepage. Others after searching i found had to be put directly into the templates html.
With my aim to do these things dynamically I set about looking into what information had to be stored and woudl be needed to make this truely dynamic. I worked out I would need a date, Team name A, Team Name B, Score A, score B and if the game was at home or not at a minimum. I also then realised that they hold intraleague games, where by members of the league play against each other, these games are presented differently on the website to the others. From this is set up a basic Database table and inputted the games that had been played this year and the upcoming games for the rest of the year.
Now that I had the DB filled with the info for this year I set about writing some simple php and mysqli to pull info from the DB. This was the last 3 home games, last 3 away games and the score from the last game played.
It took a little while to get the code all working correctly and if there was less than 3 upcoming games or none at all display a message to say more woudl be added. After doing this I split the code into 3 seperate files and tried to integrate it into the current websites wordpress layout. This was problematic but not to difficult to fix, once i had this all working i published the new files and put on the live site, all I had to do now was work on the admin section for this.