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:

Hello
Any idea for adding à MP3 player on theme like minimal or portfolio. My main goal is to have a cover and the player, so it's possimple and efficient

Thank a lot
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:

What do you need?

We had a discussion about MP3 files here:

Where should i place mp3 files
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:

Thank Edi

on the themes I use (portofolia and minima) The cover of each single is displayed. If I click on it, the page of the song opens, where I can put an mp3 player, the text of the songs ...
but then my listener has to click twice at least
I would like the player to be accessible from the home page, that each single would have its own player under the cover, even if I have to standardize the name and location of the mp3 for that
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:

You can do it by using a custom field:

https://docs.bludit.com/en/content/custom-fields
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:

Thank Edi
I'll check if I understand how to do that
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:

Otherwise you can ask me.
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:

Bonjour Edi
Ok, i created the custom field, it was easier than I thought it would be.
so now, if I add {{ MP3 }} to my page I see a player that works. fine

https://sucrepop.com/Singles/would-you-be-my-valentine

but, what I want is to place it under the art cover of the song, not on the page
Where should I put this code now
thanks a lot
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:

Do you mean on the following page:

https://sucrepop.com/Singles/
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:

yes, each mp3 song under each art cover
thanks
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:

You can use the same code for the loop in the file home.php as in the file page.php to include the player.

The loop in the file home.php shows the "preview" of every page. It starts (line 8):

Code: Select all

<?php foreach ($content as $page) : ?>
And it ends (line 20):

Code: Select all

<?php endforeach ?>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply