ARTICLES > Web Programming

[SMF] How to adding adsense into first post of topic Turn Back

2019-03-22 23:16:03

For SMF v2.0.15

After submitting website and verified by adsense programs (put code in <head> tag)
Ads banner will be ready to display If there is an automatic setting.

 

For this article, it is recommended to display an Adsense in the first post of each topic.

1. Open file: yoursite/themes/theme_name/Display.template.php

2. Find the comment line that // Show the member's signature? 

3. Next to about 3-5 lines, Before tag <br class="clear">

4. Insert IF condition below

if($message['alternate'] == 0){

echo ...Adsense code

}

Turn Back