22 September 2011,
 0

A couple of Easy CSV Importer users have reported that when trying to insert Google AdSense scripts to their custom post content, the script does not work. The problem can be at the point of saving the template, when WordPress escapes the content before storing in the database. Instead of explaining it to you, I’ll show you what was sent to me and give others some credit.

Hello Ryan – it appears that WordPress or the app has automatically changed the information for the Adsense block : it changed <script type=”text/javascript”>// <!– to <script type=”text/javascript”>// <![CDATA[ – and made the Adsense block unusable. I found a plugin called “Search and Replace” that helped me fix the records that were affected.

I highlighted and made bold the problem: <!– was changed to <![CDATA[

There may be other causes so the best thing to do is double check your template design and if possible look at what is stored in the database to be sure. This should not be necessarily but it is good to rule everything out and make sure WordPress then uses the correct script in the generated posts.

Obviously you may not be an Easy CSV Importer user and still have this issue. Try correcting the broken script in the HTML window of the WYSIWYG editor then Update. Sometimes on the Update it then saves the script properly.

 

Leave a Reply