MP3 player

User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Thank a lot, I will check it out
https://sucrepop.com
Candies for the ears
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Ok
if found the page and the loop
but when I add the line supposed to call the player {{ MP3 }}
I see the code et not the player, so I guess I must add something to tell it to display the player not the code, but I don't know the syntax

thank
Attachments
Capture.JPG
Capture.JPG (29.54 KiB) Viewed 955 times
https://sucrepop.com
Candies for the ears
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

The shortcode {{ MP3 }} works only as content of posts and pages.

But you can use the code of it in the file home.php. For example:

Code: Select all

<audio controls>
   <source src="https://sucrepop.com/Singles/mp3/<?php echo $page->custom('MP3'); ?>" type="audio/mpeg">
   Your browser does not support the audio element.
</audio>
P. S. Nice song!
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Thanks for the P.S. ;)

it works like a charm now, just need to upload the mp3 and i'll be ready
thanks a lot
https://sucrepop.com
Candies for the ears
Post Reply