A easy way to insert Mp3 in wordpress post without plugin无需插件在wordpress日志页面插入MP3播放的简易方法
By Rich Spy on Sep 11, 2009 with Comments 0
Want to let users play an .mp3 file you created right inside your WordPress blog post?
想让您的读者在阅读您的日志时候播放您创作的MP3音乐吗?
Don’t want to try to find a plugin that works consistently?
不想依赖于插件?
Luckily, it’s very easy. Just copy/paste this embed code and change the url to your url (plus any other options such as width and height, if you want). It’s that simple.
幸运的是,这很简单。只需要在HTML源代码编辑状态下,复制黏贴以下代码到您发布的日志中,并把http://www.YOURDOMAIN.com/YOURMP3FILE.mp3这个链接改成您的MP3文件所在的链接地址即可,当然如果需要的话,您也可以自定义播放器的背景色,宽度和高度。就是这么简单。
<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.YOURDOMAIN.com/YOURMP3FILE.mp3" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />
The player looks like this:
最终效果如图所示:
This code should work on any web page, not just WordPress blog posts, but it’s usually harder to find ways to handle embedding media in a blog post than it is elsewhere, so that’s why I emphasized it here.
这段代码应该可以在任何页面上运行,不光是wordpress日志页面,只不过目前要找到很好的方法来处理博客日志中的多媒体还比较难,所以我在此发布该教程。
Filed Under: Wordpress Themes
About the Author: An expert in making money online, a freelance English-Chinese translator with 8 years experiences.
