Chattahooligan Hymnal
PHP and JavaScript WordPress plugin that displays songs from the Chattahooligan Hymnal API.
by Eric Young · github.com/chattahooligans/hooligan-hymnal-wordpress-plugin · 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/chattahooligans/hooligan-hymnal-wordpress-plugin/archive/refs/heads/main.zipChattahooligan Hymnal WordPress Plugin
A WordPress plugin that displays songs from the Chattahooligan Hymnal API.
Installation
- Upload the
chattahooligan-hymnalfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Use the shortcodes on any page or post
Shortcodes
Display All Songs
[chattahooligan_songs]
Parameters:
layout- Display layout:list,grid, oraccordion(default:list)columns- Number of columns for grid layout (default:1)show_lyrics- Show song lyrics:trueorfalse(default:true)show_reference- Show reference links:trueorfalse(default:true)limit- Limit number of songs displayed (optional)search- Filter songs by search term (optional)chapter- Display songs from a specific chapter (optional)
Examples:
[chattahooligan_songs layout="grid" columns="2"]
[chattahooligan_songs show_lyrics="false" limit="5"]
[chattahooligan_songs search="victory"]
[chattahooligan_songs chapter="Hooligan Hymnal"]
Display Single Song
[chattahooligan_song id="123"]
Parameters:
id- Song ID (required)show_lyrics- Show song lyrics:trueorfalse(default:true)show_reference- Show reference link:trueorfalse(default:true)
Search Form
[chattahooligan_search]
Displays a search form for filtering songs. Can be used in combination with the songs shortcode.
Chapter Navigation
[chattahooligan_chapters]
Displays a navigation menu for song chapters. Can be used in combination with the songs shortcode.
Usage Examples
Basic Song List
[chattahooligan_songs]
Grid Layout with 3 Columns
[chattahooligan_songs layout="grid" columns="3"]
Search Form + Song List
[chattahooligan_search]
[chattahooligan_songs]
Display Only Song Titles
[chattahooligan_songs show_lyrics="false"]
Accordion Layout
[chattahooligan_songs layout="accordion"]
Chapter Navigation + Songs
[chattahooligan_chapters]
[chattahooligan_songs]
Complete Song Page Setup
[chattahooligan_search]
[chattahooligan_chapters]
[chattahooligan_songs layout="accordion"]
Specific Chapter in Grid Layout
[chattahooligan_songs chapter="Hooligan Hymnal" layout="grid" columns="2"]
Search + Specific Chapter
[chattahooligan_search]
[chattahooligan_songs chapter="Daily Diss Tracks" layout="list"]
Customization
Custom CSS
Add custom styles in your theme's CSS file:
.hymnal-song-title {
color: #your-color;
}
Caching
The plugin caches API responses for 1 hour to improve performance. The cache is automatically cleared when:
- The plugin is activated
- The plugin is deactivated
API Information
API Information
- Songs API: https://chattahooligan-hymnal.herokuapp.com/api/songs
- Songbooks API: https://chattahooligan-hymnal.herokuapp.com/api/songbooks
- Cache Duration: 1 hour
- Request Timeout: 15 seconds
File Structure
chattahooligan-hymnal/
├── chattahooligan-hymnal.php (Main plugin file)
├── includes/
│ ├── class-api-handler.php (API communication)
│ ├── class-song-display.php (Display logic)
│ └── class-shortcode.php (Shortcode handler)
├── assets/
│ ├── css/
│ │ └── hymnal-styles.css (Frontend styles)
│ └── js/
│ └── hymnal-scripts.js (Frontend JavaScript)
└── README.md (This file)
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
Support
For issues or feature requests, please contact the plugin developer.
License
GPL v2 or later