A basic WordPress plugin built to show a list of NFL teams returned from an API.
- WordPress Plugin Boilerplate
- WordPress HTTP API
- WordPress Settings API
- WordPress Transients API
- Football Icon
- Bootstrap 5
- Laravel Mix
- PurgeCSS
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.
- Run
npm install
to install all dependencies. - Run
npm run watch
to have Laravel Mix watch all SCSS and JavaScript files for changes.
To use this plugin add the shortcode [nfl_teams]
to any WordPress post or page.