I am trying to play a audio file when a user clicks on icon. The audio should be determined through a ACF. I am currently trying the following:
<div class=”player”>
<audio>
<source src=”<?php the_field(‘audio_url’); ?>”
</audio>
</div>
But, it does not work. How can I make this work? I have also tried to use direct shortcode, like this:
<audio>
<source src=”=”[acf field='audio_url']“>”
</audio>
</div>
The audio is not playing. I am struggling to manage to get the audio url from a custom field on the page. See this URL for the live icon: https://wp00377.prod.aluweb.no/?page_id=6
exactly where and how are you trying to add this code?
Sorry late answer, I have added a beaver builder HTML module with the code I mention in last comment. Together with some Javascript lines, they are displaying this icon: https://share.getcloudapp.com/yAuQYXkr
The problem is pointing to a custom field inside the HTML.