0

this is the current code and audio. I would like to change for a different song, how do I do that?

<source src="<?php echo get_stylesheet_directory_uri(); ?>/thousandyears-fade.mp3" type="audio/mp3">
    <!--<source src="<?php echo get_stylesheet_directory_uri(); ?>/thousandyears.ogg" type="audio/ogg">-->
1
  • 1
    Sorry, which part are you unsure about? You should be able to just change the filenames. Commented Feb 13, 2023 at 13:16

1 Answer 1

-1

you can't change file name. If you want to change file name dynamically try using acf for that.

https://www.advancedcustomfields.com/resources/page-link/

1
  • OK, if I cannot change the name, there is now way to change the audio file for a different song using code? What code would I use for Harry Styles' adore you for example?
    – Gabi
    Commented Feb 17, 2023 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.