4 Simple Ways to Add Audio to Your WordPress Site
Easy to add audio files on your WordPress website without any coding knowledge! This article will guide you how to use WordPress built-in features and plug-ins to easily add audio content and improve user experience.
Key points:
- WordPress supports audio files by default, adding audio is as simple as adding pictures.
- WordPress comes with audio player that supports MP3, M4A, OGG and WAV formats, and can create playlists.
- You can use external audio hosting platforms such as SoundCloud to embed audio to reduce the burden on the server.
- If you need more features or customization options, you can use plug-ins such as Compact WP Audio Player, MP3-jPlayer, and SoundCloud is Gold.
This article is created in collaboration with SiteGround. Thanks to our partners for supporting us for making SitePoint possible.
Want to share audio files on your website? Facebook does not allow sharing audio directly unless you take tedious methods such as sharing on Dropbox or converting to video. But if you have your own WordPress website, this will be very simple.
Adding audio is not difficult. We are not referring to adding cheesy background music to an outdated website full of GIF animations. Although it is not a wise move to add music casually, it does have a reasonable use to include audio on the website:
- Musicians share music samples.
- Bloggers share podcasts.
- Schools, churches and event websites provide audio for seminars, sermons or keynotes.
- Teachers, trainers and educators add audio examples to online courses.
- Bloggers add interviews and other extra content.
You may not know that WordPress supports audio file processing by default. If you know how to insert images into articles, inserting audio is just as easy.
Before HTML5, there was no standard method for playing audio on web pages. Flash was used widely, but the effect was not ideal. WordPress uses HTML5 to embed audio and is compatible with most browsers and devices, including mobile devices.
There are other ways to add audio to your website, including embedded players and WordPress plugins for third parties, including audio library sites. These methods provide additional functionality and allow the use of audio from the library website.
Of course, only use audio files that you have the right to use, including audio you created yourself, licensed audio and royalty-free audio. The sample audio used in this article comes from YouTube's free music library.
1. Use WordPress Audio Player
The easiest way to add audio to a website is to use the audio player that comes with WordPress. Unless you have special needs, there is no need to look for other ways.
You can add MP3, M4A, OGG, or WAV files to your WordPress media library. You can then insert it into the article and add an optional title.
The steps are as follows:
- Click on the "Add Media" button.
- Drag and drop the audio file into the library, or click "Upload File" and select the file to add the audio content to the media library.
- On the right side of the screen, fill in the relevant metadata of the audio file, including title, artist, album, title, and description.
- Make sure the Embed Media Player option is selected so that readers can play audio files from your article.
- Click "Insert to Article".
The following is a screenshot of the media player after adding some audio files. You can fill in the relevant metadata of the file in the panel on the right.
The following is a text view of the article after adding the image (see the second paragraph). This screenshot also demonstrates several other ways to manually add audio player code.
The following is the look of the article after preview or posting. A mini player that displays audio files. Note that the player looks the same for all three methods.
Example:
Click the audio file below to listen:
https://www.php.cn/link/18091ec91aec4f3a9a5f2aa73c0a18ca
You do not need to store audio files in WordPress media player. Store them on other servers can reduce the load on hosting your website, saving storage space, system resources, and bandwidth. In this case, use the same audio shortcode, but use the correct URL of the audio file.
You can loop or automatically play audio files by adding some options to your code (see the audio shortcode page on WordPress.org). To change the color of the media player, you need to use the following custom CSS:
<code>.music-player .wp-playlist-light, .music-player .wp-playlist-light .wp-playlist-playing { background: #999; border-color: #999; }</code>
Or, if you need extra features or customize the look of the media player, check out the plugin below.
(The following content is similar to the original text, but the sentence adjustments and paragraph divisions have been made to achieve pseudo-original effects, and pictures and links have been retained)
2. Create WordPress audio playlist
Do you have multiple audio files to share? WordPress also has built-in playlist support. Here is the way to get started:
- In the media library, click "Create Audio Playlist".
- Select the audio file to include in the playlist.
- Add the relevant metadata for the playlist and click "Create a new playlist".
- Select the desired option (for displaying track list, artist name, and picture) and click "Insert Audio Playlist".
The following is the screen you see after clicking on "Create Audio Playlist" in the media library. This option is only available if there are audio files in the library.
The following are the options you can choose for the playlist.
The following is a text view of the article after adding the playlist shortcode.
The following is the appearance after release.
Example:
This is an embedded playlist you can play:
- Digital Watch Alarm Long
- Medium Bell Ringing Near
- Crowd Yelling Series
- Walking on Hollow Metal
- Walk on Grass Series
3. Embed audio using SoundCloud player
SoundCloud is a popular service dedicated to sharing music online, similar to the audio version of YouTube. You can use SoundCloud to host audio from your embedded website, or share content already on SoundCloud.
SoundCloud simplifies the process of embedding content on its website:
- Any SoundCloud audio file that allows embedded will have a share button below it. Click on it.
- Click "Embed" and select a large square player or a smaller rectangular player. Select any option you need.
- Copy the code and paste it into your post.
The following is the screen displayed after clicking the "Share" button on SoundCloud. Click Embed at the top and select the option you prefer. Don't check the "WordPress Code" box unless your website is hosted on WordPress.com.
The following is what it looks like after pasting the code into the article.
The following is the appearance of the SoundCloud player after your article goes live.
You can also use the plugin SoundCloud is Gold, which we will introduce below. Other audio library websites, including Audiomack, offer similar embedded players.
4. Use WordPress audio plugin
If you need more powerful features or more flexible configurations than WordPress audio players, you can use the plugin. Here are some highly rated options that may contain what you need. (The plugin list is consistent with the original text, repeated description is omitted)
Adding audio on your website is just one of many interactions you can do with WordPress. If you are looking for feature-rich hosting WordPress hosting, check out our partner SiteGround, which also offers free website migration services. Do you include audio on your website? Which method do you use?
(The FAQ part is similar to the original text, but the sentence adjustment and paragraph division are made to achieve pseudo-original effect)
The above is the detailed content of 4 Simple Ways to Add Audio to Your WordPress Site. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Blogs are the ideal platform for people to express their opinions, opinions and opinions online. Many newbies are eager to build their own website but are hesitant to worry about technical barriers or cost issues. However, as the platform continues to evolve to meet the capabilities and needs of beginners, it is now starting to become easier than ever. This article will guide you step by step how to build a WordPress blog, from theme selection to using plugins to improve security and performance, helping you create your own website easily. Choose a blog topic and direction Before purchasing a domain name or registering a host, it is best to identify the topics you plan to cover. Personal websites can revolve around travel, cooking, product reviews, music or any hobby that sparks your interests. Focusing on areas you are truly interested in can encourage continuous writing

WordPress is easy for beginners to get started. 1. After logging into the background, the user interface is intuitive and the simple dashboard provides all the necessary function links. 2. Basic operations include creating and editing content. The WYSIWYG editor simplifies content creation. 3. Beginners can expand website functions through plug-ins and themes, and the learning curve exists but can be mastered through practice.

Recently, we showed you how to create a personalized experience for users by allowing users to save their favorite posts in a personalized library. You can take personalized results to another level by using their names in some places (i.e., welcome screens). Fortunately, WordPress makes it very easy to get information about logged in users. In this article, we will show you how to retrieve information related to the currently logged in user. We will use the get_currentuserinfo(); function. This can be used anywhere in the theme (header, footer, sidebar, page template, etc.). In order for it to work, the user must be logged in. So we need to use

Can learn WordPress within three days. 1. Master basic knowledge, such as themes, plug-ins, etc. 2. Understand the core functions, including installation and working principles. 3. Learn basic and advanced usage through examples. 4. Understand debugging techniques and performance optimization suggestions.

WordPressisgoodforvirtuallyanywebprojectduetoitsversatilityasaCMS.Itexcelsin:1)user-friendliness,allowingeasywebsitesetup;2)flexibilityandcustomizationwithnumerousthemesandplugins;3)SEOoptimization;and4)strongcommunitysupport,thoughusersmustmanageper

Do you want to know how to display child categories on the parent category archive page? When you customize a classification archive page, you may need to do this to make it more useful to your visitors. In this article, we will show you how to easily display child categories on the parent category archive page. Why do subcategories appear on parent category archive page? By displaying all child categories on the parent category archive page, you can make them less generic and more useful to visitors. For example, if you run a WordPress blog about books and have a taxonomy called "Theme", you can add sub-taxonomy such as "novel", "non-fiction" so that your readers can

Wix is suitable for users who have no programming experience, and WordPress is suitable for users who want more control and expansion capabilities. 1) Wix provides drag-and-drop editors and rich templates, making it easy to quickly build a website. 2) As an open source CMS, WordPress has a huge community and plug-in ecosystem, supporting in-depth customization and expansion.

One of our users asked other websites how to display the number of queries and page loading time in the footer. You often see this in the footer of your website, and it may display something like: "64 queries in 1.248 seconds". In this article, we will show you how to display the number of queries and page loading time in WordPress. Just paste the following code anywhere you like in the theme file (e.g. footer.php). queriesin
