NFL Teams
A basic WordPress plugin built to show a list of NFL teams returned from an API.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/jeremyrwross/nfl-teams/archive/refs/heads/main.zipA 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.