Spotify


Copy Embed Code

From Spotify, click on the playlist or track settings, then "Share >> Copy Embed Code".


Create Embed Code

The playlist URL will be in the format: 

https://open.spotify.com/playlist/XXXXXXXXX


Add "/embed" before "/playlist" to create an embed URL in the format: https://open.spotify.com/embed/playlist/XXXXXXXXXX


In Wordpress, go to the page or post or event, and find the content editor. Switch the editor to "Text" mode (top right corner). 

Paste the code where you want it to go on the page

Remember that if users are logged in to their Spotify account, they'll be able to listen to full songs, and if they don't, they can only listen to the 30 second preview.


Some background on the process and your options:
https://newsroom.spotify.com/2018-09-04/how-to-embed-spotifys-play-button/


Soundcloud


First, in Soundcloud, click on your track or playlist's 'Share' button.

Go to the 'Embed' tab to preview the embeddable player of your choice, then copy the shortcode. You can adjust the color and a few options here as well.



Then, in Wordpress, paste the shortcode in the Text Editor (not the Visual editor) in a Content field.  Make sure to put the code on its own line in your post. 



Source: Embedding a track or playlist on WordPress.