1. First you have to activate a child theme. We cant customize the single-album.php file directly in the plugin folder.
2. Unzip de sonaar-music.zip file attached on this post and replace the sonaar-music.php in the mp3-music-player-by-sonaar plugin folder. This modification will also be part of the next plugin update.
3. Unzip the mp3-music-player-by-sonaar.zip file and move the mp3-music-player-by-sonaar to the child-theme root.
The mp3-music-player-by-sonaar folder already content a custom single-album.php file. I have already added the "restrict" shortcode. Please tell me how it goes.
Hi Gregory, Good news, I have found a better way. You can remove the single-album.php child file. We dont need it. Please go to wp-admin>mp3 players>settings>widget player In the "single post" settings section, turn on the "Use Advanced Player Shortcode for the Single Post" option. https://d.pr/i/c4159w And copy this shortcode:
I have tried to add wasabi cloud storage to host the files. I'm trying to download an MP3 file but instead of downloading they just open a new window with a player.
I have checked if it happens direct to my domain URLs and it works normally. Im sure you have see this problem often when users change hosting to external servers.
Hi Gregory,
Are you able to provide a login credential to the wp-admin?
Thanks,
Alexandre from the Sonaar.io Crew
Please try this,
If you are adding this shortcode in a playlist post content
You have to replace the albums parameter by the right post ID.
Please tell me if this new player is hidden for guess user.
Thanks,
Alexandre from the Sonaar.io Crew
Kindly fix the integration for restricted plugins to recognize our audio player post type.
Thank you very much for your support.
Hello Gregory,
If you will be able to customize the single-album.php file, are you will be able to insert the [restrict paid="true"] shortcode?
Thanks,
Alexandre from the Sonaar.io Crew
Hello Alexandre,
Where can locate this file be? can you please give me a little more information about what I have to do?
Thank you
Let try this,
1. First you have to activate a child theme. We cant customize the single-album.php file directly in the plugin folder.
2. Unzip de sonaar-music.zip file attached on this post and replace the sonaar-music.php in the mp3-music-player-by-sonaar plugin folder. This modification will also be part of the next plugin update.
3. Unzip the mp3-music-player-by-sonaar.zip file and move the mp3-music-player-by-sonaar to the child-theme root.
The mp3-music-player-by-sonaar folder already content a custom single-album.php file. I have already added the "restrict" shortcode. Please tell me how it goes.
Thanks,
Alexandre from the Sonaar.io Crew
Thank you very much for this is a good approach however not blocked the page.
May I have a login credential to the wp-admin?
Thanks,
Alexandre from the Sonaar.io Crew
Sorry but it doesnt work
Thanks,
Alexandre from the Sonaar.io Crew
Kindly try it now.
I forgot to add an "echo"
Please replace the single-album.php file in the child theme by this new one.
Thanks,
Alexandre from the Sonaar.io Crew
Unfortunately not hide the player for me
https://www.electrobuzz.net/playlist/beatportal-on-our-radar-2021/
Hi Gregory,
Good news,
I have found a better way.
You can remove the single-album.php child file.
We dont need it.
Please go to wp-admin>mp3 players>settings>widget player
In the "single post" settings section, turn on the "Use Advanced Player Shortcode for the Single Post" option.
https://d.pr/i/c4159w
And copy this shortcode:
[restrict paid="true"][sonaar_audioplayer show_playlist="true" show_album_market="true" show_track_market="true"][/restrict]
Thanks,
Alexandre from the Sonaar.io Crew
Hello Alexandre,
I'll check it now and update you, thank you very much for your help.
You are welcome
Thanks,
Alexandre from the Sonaar.io Crew
There is existing code
Should I keep both? or remove above code
Remove the default code.
If you want to change some player shortcode parameter, here the documentation
https://sonaar.ticksy.com/article/15282
Thanks,
Alexandre from the Sonaar.io Crew
It works perfectly now, thank you.
I have tried to add wasabi cloud storage to host the files. I'm trying to download an MP3 file but instead of downloading they just open a new window with a player.
I have checked if it happens direct to my domain URLs and it works normally. Im sure you have see this problem often when users change hosting to external servers.
Hi Gregory,
This happen because we are trying to download a file from another server.
If you host the mp3 on the site server, this will not happen.
You can probably contact Wasabi cloud and ask them if they can change their CORS policy.
Here an article for more detail. https://stackoverflow.com/questions/26921024/html5-download-attribute-not-working-cross-domain-can-it-be-made-to-work
Thanks,
Alexandre from the Sonaar.io Crew
Thank you very much
You are welcome
Thanks,
Alexandre from the Sonaar.io Crew