How to add Adsense to a Drupal Node

By | May 21, 2014

If you have been using Drupal like me for your website, I am sure you would have wondered how to add Google Adsense to a Drupal Node.

This is how you can do it.

go to your theme directory and edit the node-file: $(drupal_home)/themes/$(theme)/node_page.tpl.php

add your adsense code where you want the ad to appear:

<?php if (!$teaser) {

echo ‘your google adsense code’

;}?>

Leave a Reply