Embedding audio into your posts or pages is very easy using the WordPress block editor. Simply click to add an audio block:
Then, select to upload your audio file, use a previously uploaded audio file in the Media Library, or paste the URL to an externally hosted audio file.
(Alternatively, you can also click and drag an audio file from your computer directly into the block editor where you'd like it to display.) Once you've selected your audio file, the player will display directly in the block editor:
Just like it will on the actual post/page itself when you publish or save:
Autoplay and loop
To have your audio autoplay and/or loop during playback, you can use the options provided in the side panel when your audio block is selected.
Just be aware that having audio autoplay when a post or page is first loaded can be startling. And it's even more frustrating to visitors if they want to mute but the media player is not readily visible without scrolling. So to avoid visitors leaving your site prematurely, autoplay should be used only when necessary.
Comments
0 comments
Article is closed for comments.