View Single Post
  #1  
Old 09-22-2012, 09:48 AM
crazyforcrust crazyforcrust is offline
Registered User
Genesis Member
 
Join Date: Aug 2012
Posts: 5
Default Javascript in post & custom fields

I am trying to add a sponsor code to a post. The html they gave me is in javascript, and the editor keeps stripping the script from my post when I switch between html and visual.

I know that there is a chance, if I put the html into my post and immediately publish, that it will show up, but I need to know for sure that the content will show before I publish as this is a sponsored post.

I have searched (a lot) about this issue and it seems it is a regular problem with wordpress. I am wondering if I enter the code via a custom field, if the javascript will show up?

Now, I figured out how to make the custom fields show in the post editor. I *think* I figured out how to add a custom field.

The html I need to add to my post is:

<p>
<script type="text/javascript" src="http://thirdparty.fmpub.net/placement/515381?fleur_de_sel=[timestamp]"></script>
</p>
This post is sponsored by <a href="http://r1.fmpub.net/?r=http%3A%2F%2Fad.doubleclick.net%2Fclick%3Bh%3Dv 2%7C3FC7%7C0%7C0%7C%252a%7Cq%3B261384384%3B1-0%3B0%3B82742153%3B31-1%7C1%3B50321305%7C50305898%7C1%3B%3B%3Bpc%3D%5BTP AS_ID%5D%253fhttp%3A%2F%2Fwww.verybestbaking.com%2 Frecipes%2F144809%2FDark-Chocolate-Brownies%2Fdetail.aspx&k4=4891&k5={banner_id}"targ et="blank">Nestlé® Toll House® Morsels</a>, the perfect special ingredient for all of your family’s favorite treats!

In the post, I went to the custom fields section and added a new custom field called "nestle" with that code as the value.

At this point I am stuck because I have no idea what to do next.

Here is a screenshot of what the custom field looks like:


I think I need to add some code somewhere else? Or something? I am a complete novice and am very scared of entering anything in my .php file without expert opinion.

I have read several of the "help" articles on wordpress...but they are all written talking about codes and such and I have no clue.

Please help, I really need to make sure this code and the image is in my post.

My url is: http://www.crazyforcrust.com

Thank you!