WAIT: Adsense Code ain't working with Bricks Code element

Hi,

The Adsense ads code always has the <script> tags and when I paste it on the Bricks code element, inside the PHP/HTML field, it doesn’t reflect. Also, I can paste it in the JS field because it says, the field automatically adds the script tags and it shows me error when I paste the Adsense code.

Hi,

Like you figure out, it will not work in the “javascript” part, because it will automatically wrap it with the <script> tag.

If you add it in the PHP/HTML it should work, but (I’m guessing), it needs to be on different part of the page.

If you only want to add it to one page, then you can add it to the Settings (that gear icon) → Page Settings → Custom code, and paste the code where you want it to be. Probably header scripts?

Or, if you want to have the code available over the whole website, then add it to WP Dashboard → Bricks → Settings → Custom Code, and add it to the desired place. Probably in the header.

Hope that helps :slight_smile:
Matej

The code you see is a banner ads created from Adsense to be used on post page template, to display the ads on posts. It’s not to be added on the head.

But still you’re inserting html code (surrounded by <script> tags) into the JS area. You need to insert it into the PHP & HTML area instead.

Did you enable code execution and sign the code?

Best,

André

In this case, you will have to add it to PHP & HTML field. It should work, but like @aslotta commented, please check that you have signed the code.