# Embedding SermonAudio in Wordpress



## JonathanHunt (Dec 5, 2011)

Does anyone know how to embed sermonaudio code in a wordpress page? I can see that others have done it, but I end up with a blank page all the time. The code works fine on a plain html page, so the problem is how I am using wordpress obviously.

I am a computer-doofus so don't assume I know what I'm talking about. FYI, I am using the theme 'twentyten'.


----------



## Semper Fidelis (Dec 5, 2011)

Create a Wordpress Page and make sure you are in HTML mode for the Page. Pasting the code into the GUI editor will mess it up.

Here's the one I use:

```
<code><!--Begin SermonAudio Link Button-->
<script type="text/javascript" language="JavaScript">// <![CDATA[
document.write("<" + "script src='http://www.sermonaudio.com/code_sermonlist.asp?sourceid=yourid&rows=30&hideheader=false&hidelogo=false&alwaysbible=false&expand=false&reversecolor=false&hidesort=false&sourcehref=" + escape(location.href) + "'><","/script>");
// ]]></script>
<!--End SermonAudio Link Button--></code>
```
Make sure you put in your sermon audio id where you see yourid above.


----------



## JonathanHunt (Dec 5, 2011)

Thanks, Rich, but your code results in the same outcome I am already getting - a blank page which just displays this:

// <![CDATA[
document.write("");
// ]]>


D'oh!


----------



## Covenant Joel (Dec 5, 2011)

You will need to paste the code in html mode and then not go back to visual mode, just hitting publish directly. If you go back to WYSIWYG mode it may cause the problem again.


----------



## JonathanHunt (Dec 5, 2011)

Ah well. The problem is that I am using wordpress.com. which does not allow most html codes and strips them out automatically as soon as you hit 'publish'. Explains a lot. If I used the full wordpress software (.org rather than .com) there would be plugins for this sort of thing. A pity!


----------



## Semper Fidelis (Dec 5, 2011)

JonathanHunt said:


> Ah well. The problem is that I am using wordpress.com. which does not allow most html codes and strips them out automatically as soon as you hit 'publish'. Explains a lot. If I used the full wordpress software (.org rather than .com) there would be plugins for this sort of thing. A pity!



That's too bad. You could contact support and ask them if there's a way around this. I'm not using a plugin but just using the built in ability of the Wordpress.org software to allow you to edit and save pages or posts in html mode.


----------



## JonathanHunt (Dec 5, 2011)

It is apparently a security issue. All .org sites 'stand alone', whereas the free .com sites do not. I won't be biting the bullet - although to be honest 119 dollars for a site migration is not a big deal. Once I am settled at the new church, we might look at it again.


----------



## Semper Fidelis (Dec 5, 2011)

JonathanHunt said:


> All .org sites 'stand alone', whereas the free .com sites do not.


I understand this. I have built several .org sites.

You don't need to spend $119 to migrate. I can do it for free and host your site for free as well if you wish.


----------

