This WordPress plugin allows the user to customize the name of the artist or song, and add a Spotify link to the same on their webpage easily. It is written in PHP.
The name of this WordPress plugin is "spotify artist or song link plugin". The steps to upload and use this plugin are explained with an example of a sample website built using WordPress.
The first step is to download the plugin and upload it on WordPress. To upload the plugin on your WordPress dashboard, go to, Plugins -> Add New -> Upload Plugin. The plugin has to be uploaded as a zip file with the same name as the plugin.
Once the plugin is uploaded, activate the plugin if it is not activated. To do this, go to, Plugins -> Installed Plugins -> Go to the required plugin and click on activate.
Fig 1. Example of how the plugin looks once uploaded and activated.
Once the plugin is activated, the next step is to customize it. After the plugin is added, a new sub-section called Spotify will appear on the customize section on your WordPress dashboard. To navigate to the customize section, go to, Dashboard -> Appearance -> Customize.
Fig 2. Spotify is added to the customize section.
The next step is to click on the Spotify sub-section, enter the name of the artist or song in the text box provided, and publish the changes made.
Note: If the song or band name is not mentioned and the text box is empty, the link will not appear on the webpage.
Fig 3. Entering the name of the band or song, in this example One Direction.
After customizing the plugin, add the shortcode "[listen] Title [/listen]" to display the required link of the artist mentioned on your webpage.
The title can be anything you want. If no title is mentioned, the default title which says "Click here" will appear on the webpage. They are multiple ways to add the shortcode.
One way is by going to dashboard -> Posts -> All Posts. Here edit the post you want to add the link in, place the shortcode mentioned above in the position you want and update the changes.
Fig 4. Add the shortcode. In this example, the title given to the link is "click here to navigate to the band/song on Spotify".
Once the shortcode is in place, the link to the customized song/artist will be displayed on the webpage with the specified title as shown below.
Fig 5. Displaying the link with the title mentioned.
When the link is clicked, the webpage navigates to the respective Spotify page of the artist or the song as shown below. The link leads to the search result page of the specified artist/song on Spotify. This can be changed according to your needs in the source code of the plugin.
Fig 6. Spotify page of the artist One Direction.
Submitted by Smitha S Maganti (smithakumar16)
Download packets of source code on Coders Packet