• CmdrKeene

    (@shawnkeenegmailcom)


    Hi all,
    I thought this would work well enough, I’ve already got several “text/html” widgets in my sidebar with code snippets from Facebook and other social networks.

    But when I generated my AdSense code (which is wrapped in script tags) and try to place it in a text widget, it won’t save (the spinning circle goes on forever).

    Any idea’s what’s up?

Viewing 3 replies - 1 through 3 (of 3 total)
  • <script> tags are part of javascript.. not text/html.

    You will need a plugin to use either PHP in your widget area.. or use a custom function to add the adsense script to that widget (using it’s unique WP generated ID).

    Thread Starter CmdrKeene

    (@shawnkeenegmailcom)

    I’ve got lots of other widgets (facebook, like button, google +1 button) that use script tags that work alright. The stuff inside a script tag is javascript, but the tag itself is html and should work with the innerhtml being pure script or just empty with an src attribute set to point to a .js file right?

    I tested it out by adding my own script block with just an alert() function to say Hello World.

    Thread Starter CmdrKeene

    (@shawnkeenegmailcom)

    Well, I went ahead and tried a plugin (“HTML Javascript Adder”), it has the same issue — the dashboard won’t save the code after I paste it in. Something must be wrong with my Google AdSense code block. I’ll try generating a new one. Very weird.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot Place Adsense Script in Text Widget’ is closed to new replies.