NFL Teams
A basic WordPress plugin built to show a list of NFL teams returned from an API.
by Jeremy Ross · github.com/jeremyrwross/nfl-teams · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jeremyrwross/nfl-teams/archive/refs/heads/main.zipReadme
NFL Teams
A basic WordPress plugin built to show a list of NFL teams returned from an API.
Libraries Used
- WordPress Plugin Boilerplate
- WordPress HTTP API
- WordPress Settings API
- WordPress Transients API
- Football Icon
- Bootstrap 5
- Laravel Mix
- PurgeCSS
Development
To speed up development this plugin uses Boostrap 5 to leverage the tabs component and utility classes. Laravel Mix is used to compile SCSS and JavaScript.
Bootstrap 5 was chosen because it no longer requires jQuery as a dependency. Only components that are required are imported into the JavaScript and SCSS. To further optimize the plugins CSS, PurgeCSS is used to remove unused CSS.
Dev Setup
- Run
npm installto install all dependencies. - Run
npm run watchto have Laravel Mix watch all SCSS and JavaScript files for changes.
Usage
To use this plugin add the shortcode [nfl_teams] to any WordPress post or page.