Welcome to WebmasterWorld Guest from 54.211.17.91

Forum Moderators: rogerd

Message Too Old, No Replies

question about adding javascript

   
4:14 am on Jul 8, 2012 (gmt 0)

5+ Year Member



I'm helping a friend add code into the HTML view of a page and in HTML view it is ok even when I save it, but if I switch to Visual view, it adds this in some areas --> <![CDATA[

I don't want this code added. It's for an ad network and I am not supposed to edit their code at all. Any input? Thanks
2:16 pm on Jul 8, 2012 (gmt 0)

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



SO just to be clear. You add the code while in HTML mode, update the page, switch to Visual and there you see the CDATA or do you see it while in HTML mode?

This might have the answer for you: [stackoverflow.com...]



And for those who may not know what CDATA is: [w3.org...]
3:12 pm on Jul 8, 2012 (gmt 0)

5+ Year Member



Hi, No I go to HTML mode, add the code, save it. In Visual mode I don't see the code at all, but when I go back to HTML mode it has added the CDATA stuff. I visited the link and implemented the code, but I think that is possibly for when users post on pages? What page do I need to update for when I add posts in the admin area?
1:24 pm on Jul 9, 2012 (gmt 0)

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I'm not sure exactly. The suggested fix involves editing post-template.php which should address the issue. You could create a custom post-template file and use that instead for each post and this way avoid editing the default file. In either case, I think you'll need to do some research to figure out the best way to modify the files to get what you want.
2:07 am on Jul 11, 2012 (gmt 0)

5+ Year Member



yeah... looking into this
3:47 pm on Jul 11, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



This is probably one of the auto thingies Wordpress does - like add paragraph tags when you don't want it to. one of the fixes for that [wordpress.org] (there are many,) but doubt it will help this particular issue. Maybe search for a plugin that removes it. I found one that might do it: TextControl [wordpress.org].
4:03 pm on Jul 11, 2012 (gmt 0)

5+ Year Member



Thanks rocknbill. I will definitely check it out. I've been at a standstill on this issue for a week.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month