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:23)4) Evolution (03:38)5) Hold On (03:06)6) Kiss (04:10)7) Do What They Say (04:17)8) Ever Be (04:49)9) Love and Luxury (03:01)10) Innocent Bystander (03:28)11) Killing (03:37)12) Hushabye (03:52)13) I Will Protect You (05:29)
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:28)2) The Gathering (07:51)3) Return Of The Shadows (08:13)4) Blue Muppet (08:25)5) Psycho (07:53)6) Montoya Rms (08:20)7) Tommy The Bat (07:35)8) Virtual Voyage (08:24)9) Over Mode (08:35)
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 (03:46)2) The Call of Ktulu (08:52)3) Master of Puppets (08:38)4) Of Wolf and Man (04:16)5) The Thing That Should Not Be (06:32)6) Fuel (04:29)7) The Memory Remains (05:42)8) No Leaf Clover (05:43)9) Hero of the Day (04:22)10) Devil's Dance (05:18)11) Bleeding Me (08:18)12) Nothing Else Matters (06:47)13) Until It Sleeps (04:30)14) For Whom the Bell Tolls (05:11)15) -Human (04:19)16) Wherever I May Roam (06:42)17) Outlaw Torn (09:58)18) Sad but True (05:24)19) One (08:25)20) Enter Sandman (05:29)21) Battery (05:10)
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
1Jagdzeit by Megaherz
Play count: 4
2Hate Like Me by Combichrist
Play count: 3
3Liar by Gothminister
Play count: 3
4Fuel - LIVE by Metallica
Play count: 3
5Of Wolf and Man by Metallica
Play count: 3
6Angst by Rammstein
Play count: 3
7Armee der Tristen by Rammstein
Play count: 3
8L├╝gen by Rammstein
Play count: 3
9Zeit by Rammstein
Play count: 3
10PUMPED UP KICKS by 3TEETH
Play count: 2

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"]
A non existing song by Unknown

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.

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