homepage Welcome to WebmasterWorld Guest from 54.167.238.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

    
question about adding javascript
hal12b




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

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

 

lorax




msg:4473654
 2:16 pm on Jul 8, 2012 (gmt 0)

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...]

hal12b




msg:4473659
 3:12 pm on Jul 8, 2012 (gmt 0)

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?

lorax




msg:4473804
 1:24 pm on Jul 9, 2012 (gmt 0)

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.

hal12b




msg:4474450
 2:07 am on Jul 11, 2012 (gmt 0)

yeah... looking into this

rocknbil




msg:4474651
 3:47 pm on Jul 11, 2012 (gmt 0)

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].

hal12b




msg:4474661
 4:03 pm on Jul 11, 2012 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved