mardi 20 avril 2021

How to make a variable actually work in an audio player

I'm working on a website and want a random mp3 audio file to load on the page. The variable $random contains the path to the random audio file. I've tried many variations to make the PHP variable work here, but can't find a way to do it. When I simply type in the same path as the variable contains, it works. But the variable won't work. How do I make this code see the content of the variable and thus load the audio?

  • Thanks. Here's the code:

    echo do_shortcode ('[sc_embed_player_template1 fileurl= "/$random"; ] ') ;




Aucun commentaire:

Enregistrer un commentaire