Title: Javascript in posts&#8230;works but&#8230;
Last modified: August 19, 2016

---

# Javascript in posts…works but…

 *  [echoca](https://wordpress.org/support/users/echoca/)
 * (@echoca)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/javascript-in-posts-2-2/)
 * Hello,
    I have searched but most topics only have 1 post no replies.
 * I want to load some JS into a post. The JS comes from [Google AJAX API](http://code.google.com/apis/ajaxsearch/wizards.html)
   and loads news headlines from where ever you choose (lots of other things to 
   choose from follow the link to see).
 * I found [this](http://www.ooso.net/index.php/inline-js) plugin for including 
   JS in a post.
 * So if I followed the directions (simple ones), when the post is saved WP inserts
   </br> after almost everything in the JS when viewing source.
 * I do and always have the rich text editor turned off in my profile I’ll add here.
 * So I figured I would see if I could load it in to a sidebar text widget. I did
   not take the code out of my test post and added the same code to my text widget(
   with out the [inline] code needed for the plugin). When I save it (the text widget)
   and load the test everything now shows up in the post but not in the side bar.
 * The text widget code gets added to the page with out the WP formating and my 
   div code to display the info in the post shows what I want in the post.
 * Not a big problem I guess, the text widget, I have left with no title so nothing
   shows up in it and just loads the JS code correctly for the post to display it.
 * Any idea how to get this to load the JS from the post with out the added WP insertions?
   I could load it in the header but only want the extra code in the one post displayed.
 * Hope I make sense and have included enough info.
 * This will be the first time I share my site link with anyone other then friends.
   Be kind please!!
    [My site.](http://www.echocanada.net/?p=81)
 * Thanks and take care!

The topic ‘Javascript in posts…works but…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [echoca](https://wordpress.org/support/users/echoca/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/javascript-in-posts-2-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
