WordPress Plugin: Music

Cache: 86400

Introduction

Add your personal music charts to your WordPress site. Easily embed information about albums and song lyrics using shortcodes.

Some features of this plugin require the use of a Last.fm API key. Last.fm is a free service which tracks your music listening via an application on your computer and/or phone. Alternatively Last.fm can be linked to your Spotify account to track listening without the need for an app.

Features

  • Shortcode to embed your personal music charts
  • Shortcode to embed information about an album
  • Shortcode to embed lyrics
  • Widget to embed your personal music charts (coming soon)

Album shortcode

The album shortcode allows information to be gathered about an album, such as artwork, track listings, release year and description.

Arguments:

  • artist: Artist name wrapped in quotes if the text contains spaces – Required
  • album: Album name wrapped in quotes if the text contains spaces – Required
  • cache: Cache time in minutes, if not included, the default cache time will be used – Optional

Basic usage:

[album artist=korn album=untitled]
Korn - Untitled
Album artwork for Korn - Untitled
1) Intro (01:57)2) Starting Over (04:02)3) Bitch We Got a Problem (03:22)4) Evolution (03:37)5) Hold On (03:05)6) Kiss (04:09)7) Do What They Say (04:17)8) Ever Be (04:48)9) Love and Luxury (03:00)10) Innocent Bystander (03:27)11) Killing (03:36)12) Hushabye (03:52)13) I Will Protect You (05:32)
Published: 05 May 2020

Including a custom cache:

[album artist="Infected Mushroom" album="The Gathering" cache="600"]
Infected Mushroom - The Gathering
Album artwork for Infected Mushroom - The Gathering
1) Release Me (08:32)2) The Gathering (07:43)3) Return Of The Shadows (08:19)4) Blue Muppet (08:08)5) Psycho (08:38)6) Montoya Rms (08:20)7) Tommy The Bat (07:29)8) Virtual Voyage (08:24)9) Over Mode (08:45)
Published: 12 Dec 2013

Arguments with special characters:

[album artist="Metallica" album="S&M"]
Metallica - S&M
Album artwork for Metallica - S&M
1) The Ecstasy of Gold (01:58)2) The Call of Ktulu (10:15)3) Master of Puppets (08:34)4) Of Wolf and Man (04:34)5) The Thing That Should Not Be (06:27)6) Fuel (04:23)7) The Memory Remains (04:33)8) No Leaf Clover (06:15)9) Hero of the Day (04:25)10) Devil's Dance (06:00)11) Bleeding Me (08:31)12) Nothing Else Matters (06:21)13) Until It Sleeps (04:30)14) For Whom the Bell Tolls (04:44)15) -Human (04:19)16) Wherever I May Roam (07:25)17) The Outlaw Torn (28:27)18) Sad but True (06:31)19) One (08:51)20) Enter Sandman (05:55)21) Battery (06:03)
Published: 01 Jan 2013

An album which cannot be found:

[album artist="Unknown" album="A non existing album"]
Album not found

Charts shortcode

Display your personalised charts based on your recent listening. The charts shortcode requires a free Last.fm API key. Last.fm can be installed as an application on your computer or phone to track the music you listen to. If you listen to your music via Spotify, Last.fm can track your Spotify usage without the need for an additional app.

Arguments:

  • limit: The number of tracks to show in your charts – Optional – Default: 10

[my_chart limit=10]
TheVDM's Charts
RankTrack
1Suite-Pee by System of a Down
Play count: 4
27 Words by Deftones
Play count: 3
3Only for the Weak by In Flames
Play count: 3
4Full Nelson by Limp Bizkit
Play count: 3
5My Generation by Limp Bizkit
Play count: 3
6Disposable Teens by Marilyn Manson
Play count: 3
7Dawn of Victory by Rhapsody
Play count: 3
8Emerald Sword by Rhapsody
Play count: 3
9Erian's Mystical Rhymes by Rhapsody
Play count: 3
10Unholy Warcry by Rhapsody
Play count: 3

Lyrics shortcode

Embed the lyrics of a song into a page or post using a simple shortcode.

Arguments:

  • artist: The artist name, wrapped in quotes if the name contains spaces – Required
  • song: The song name, wrapped in quotes if the name contains spaces – Required

Basic usage:

[lyrics artist="Guns N Roses" song="Welcome to the Jungle"]
Welcome to the Jungle by Guns N RosesParoles de la chanson Welcome To The Jungle par Guns 'N' Roses
Welcome to the jungle
We got fun 'n' games
We got everything you want
Honey we know the names
We are the people that can find
Whatever you may need
If you got the money honey
We got your disease


In the jungle
Welcome to the jungle
Watch it bring you to your shun na,na,na,na,na,na,na,na,knees, knees
I wanna watch you bleed



Welcome to the jungle
We take it day by day
If you want you're gonna bleed
But it's the price you pay
And you're a very sexy girl
Very hard to please
You can taste the bright lights
But you won't get there for free
In the jungle
Welcome to the jungle
Feel my, my, my, my serpentine
I,I, wanna hear you scream


Welcome to the jungle
It gets worse here everyday
Ya learn ta live like an animal

In the jungle where we play
If you got a hunger for what you see
You'll take it eventually
You can have anything you want
But you better not take it from me


In the jungle
Welcome to the jungle
Watch it bring you to your shun na,na,na,na,na,na,na,na,knees, knees
I wanna watch you bleed


And when you're high you never
Ever want to cum down, suck down, suck down, suck down YEAH!!!!!



You know where you are
You're in the jungle baby
You gonna die
In the jungle
Welcome to the jungle
Watch it bring you to your shun,na,na,na,na,na,na,na,na,knees, knees
In the jungle
Welcome to the jungle
Feel my, my, my, my serpentine
Jungle,in the jungle
Welcome to the jungle
Watch it bring you to your shun,na,na,na,na,na,na,na,na,knees,knees
Down in the jungle
Welcome to the jungle
Watch it bring you to your

It's gonna bring you down!
HOO!

A song which could not be found:

[lyrics artist="Unknown" song="A non existing song"]
No lyrics found

Charts widget

Installation

F13 Music can be installed via the Plugins section of WordPress. If you wish to download the source code, simply upload the code to the wp-content/plugins folder on your webserver, then visit the Plugins section of WordPress admin to activate the F13 Music.

Configuration

Configuration of F13 Music is by the form provided in your WordPress Admin area under the menu

"F13 Admin" >> "Music"

Here you will be able to add a Last.fm API key allowing certain features of the plugin to function.
Settings

  • Last.fm API Key: Provided by the Last.fm API
  • Cache timeout: Enter the time in minutes that you wish data to be cached for. A higher number will cache data for longer, reducing the number of API calls. A lower number will allow data to be updated more regularly at the cost of more API calls and fractionally slower page load times.

Obtain a Last.fm API key

  1. If you haven’t already got a Last.fm account, visit Last.fm and join.
  2. Visit Last.fm/api/account/create and fill in the form.
  3. Copy your Last.fm API key to the “F13 Admin >> Music” page in WordPress admin.

Linking Spotify to Last.fm

  1. Visit Last.fm/settings/applications
  2. Click the “Connect” button for the “Spotify Scrobbling” application. Please note “Spotify Playback is not required for music tracking.
Example of the F13 Music settings page

F13 Music Settings

WordPress

GitHub

GitHub repository: f13dev/f13-music
Created: April 17, 2021 - 06:41am
Last commit: October 30, 2021 - 09:12am
Forks: 0
Open issues: 0
Stars: 0
Watchers: 0
Description: N/A
git clone https://github.com/f13dev/f13-music

6 tags for "WordPress Plugin: Music"


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.