Iframe as Adsense

  • Robin


    Hello everybody,

    I have Graphene as my WordPress theme since a few months. I like the theme very much. But now I have little question about it.

    By ‘Adsense’ I wanna use iframe for to show a little script who shows every time another picture as ad. But when I save it, it goes away and the field is blank. When I place for instance <img src="ad"</img> it keeps.

    Can anybody help me with this problem?

    Thanks in advance,



    Kenneth John Odle


    Where are you trying to insert this? In a text widget? Text widgets should be able to handle <iframe> without any problem.

    Your HTML, by the way, is incorrect. It should be either <img src="ad"></ad> or <img src="ad" />



    Sorry I was a little bit confused.

    I try this at folllowed place:

    graphene (Mobile).png


    Sorry I was a little bit confused.

    I try this at folllowed place:


    The code I place there is: <iframe src="my url"></iframe>. Now when I refresh the page, it’s gone.. :s


    Kenneth John Odle


    You need to add the Adsense code from Google there. Not an iframe. Google code will automatically take care of the rest.


    Syahir Hakim


    That’s because the option field for the adsense code filters out disallowed tags, which include <iframe>. (It uses the wp_kses_post() function if you’re interested to know more).

    See this tutorial for pointers on how you can add <iframe> to the list of allowed tags:


Viewing 6 posts - 1 through 6 (of 6 total)

  • You must be logged in to reply to this topic.