Website – what has actually changed?

Despite the almost imperceptible visual change – the website has had an almost complete refresh.

The previous version of the website had a lot of custom code within the bespoke TWRFC plugins and theme. This was making maintenance pretty hard (and nearly always required me). The pervasive nature of my custom code made a change of site-design almost impossible; and was also preventing us upgrading to the most recent wordpress and php version.

Whilst this might look like a minor-change – it’s actually almost a complete re-write of the custom code under-pinning the site-design. The custom code is not only much reduced, it is also now contained into a teeny child-theme, and 2 well contained block plugins. The code to generate the fixtures and league table information has all be externalised and is now accessed via api (hosted on firebase). This should all be much easier to maintain, and positions the website for easier redesign in the future.

This is only the first step of a website refresh – there remains much work to be done on the content, some of the pages are still rather dated; however this should now be easier/cleaner when we find the time; and it should also be easier to give the great social media team a little more ownership of look/feel.

Changes include:

  • Upgraded: wordpress to v6, php to v8
  • Updated all plugins/themes to latest version
  • Disabled the Blog
    Blog post type removed, and blog functionality hidden
    All existing articles converted to news articles
  • Converted all pages to Gutenberg blocks and removed legacy support for classic editor
    Removed lots of legacy plugins and replaced with blocks equv.
    Added a few custom blocks (profile, YouTube, images, zenfolio …) for things that we were hand-rolling:
    • Profile
    • Photonic Gallery (to allow import of Bruce’s photos)
    • Custom – Fixtures/Now&Next, Fixtures/List, LeagueTable, Pitch-Allocations
    • Out of the box – Gallery, Youtube, …
  • Moved logos to template widgets area
    Removed the logo_carousel plugin, and replaced with a block equv.
    Sponsor logos are now edited from the ‘customize->widgets’ area of admin; there are separate widgets for club, ladies, youth, academy and schools.
  • Removed Team & Fixtures custom page_type
    Team pages are now standard pages
    All old fixture reports converted to news articles
    Removed the unused googlemail display on pages
    Code found here: https://github.com/mcroker/twrfc-wordpress-rookie-theme
  • Fixtures and league table sourced from an external api
    Custom block types created for now_and_next, league_table and fixtures_list
    This is still my code – but it’s much cleaner, and rather cleverly has a lazy-update in the background when the page is loaded, so no need to update manually; opposition team images are hosted on api and cached.
    Code found here: https://github.com/mcroker/sportsdata-wordpress
  • Recreated the pitch-allocations using a custom twrfc-map block
    Again my code, but much cleaner & more self-contained
    Code found here: https://github.com/mcroker/twrfc-wordpress-pitch-allocations-plugin
  • Purged a lot of unused stuff
    ~60 pages, ~20 redirects, ~80 media, ~4 themes, …
    Fixed all the orphaned database records
    Removed the old unused sites support… coaching…
  • Fixed image display from Bruce’s site
    The old plugin was broken, you can see how to use the new one here https://twrfc.com/guides/website/
  • Match Reports page
    Added a page https://twrfc.com/senior/match-reports/
    Added a category for news items Match Reports