Plugin Author
sonaar
(@sonaar)
Hi there,
there are multiple ways to add javascript to your website.
You can add it in HTML with:
<script>
jQuery('[data-albums="75"]').find('li:nth-child(2) .audio-track').trigger( "click" );
</script>
or use a third party plugin such as https://wordpress.org/plugins/insert-script-in-headers-and-footers/
I think you will need to hire a WordPress developer to customize it to your needs.
2: how will people be able to listen to the audio if you remove the play control?
you can remove any assets using display:none; css on elements you want to hide.
3: you can do it with Javascript as the example provided above or in this article https://sonaar.ticksy.com/article/15282
ok I insert this code in the footer.
But I wanted to understand what the trigger command is like
on a buttom, image, link element. This is not written.
The event to be assigned to the click of the link to load the mp3 in the shortcode (do_shortcode)
[Button click] ——-> trigger audio url in shortcode feed = “audio.mp3″
in footer…
<script> jQuery(‘[data-albums=”75”]’).find(‘li:nth-child(2) .audio-track’).trigger( “click” ); </script>
Plugin Author
sonaar
(@sonaar)
Sorry I dont correctly understand your question/formulation of the question.
Please check with your WordPress developer on how to implement js call into your theme, as this can be very different from different themes and plugins.
i am the developer of my theme and i am asking you how i should implement js calls for your plugin.
How should I insert the link with js calls to your player?
all by implementing shortcode with links (feed = “https://www.domain.com/01.mp3)
Why not put detailed examples in the guide?
You have just written the script code to insert and stop!
jQuery (‘[data-albums = “75”]’). find (‘li: nth-child (2) .audio-track’). trigger (“click”);
Plugin Author
sonaar
(@sonaar)
Well, js can be implemented in different ways depending on your setup and what you are trying to achieve…
You can add jQuery/JS on your custom button with something like
$('#button1').click(function(){
$('[data-albums="75"]').find('li:nth-child(2) .audio-track').trigger( "click" );
});
This is just an example and I have not tested this code.
Please note that implementing your own JS code is beyond the scope of our free support.Thanks for your understanding.