ID #1045

How to add Google AdSense code to PhpMyFAQ sites?

I assume that you are trying to post Google content Ads in 336*280 rectangles.

There are two options, both of which are very simple.

1. Open /template/index.tpl This is the template file that controls the layout of the mainpage. Find the function named  {writeContent}, before this function, simply add the following html code:

<div style="float: right, margin: 0  0 10px 10px">

Your Google AdSense code goes here!

</div>

Note that this approach produces a rectangle on every page in your FAQ site, including the news/homepage. 

2. You can alternatively open /template/artikel.tpl, find the following lines in this file:

    <!-- Article -->
<div id="article_content">{writeContent}</div>
<!-- /Article -->

After these lines, add your code as shown in the first case.

Note that this only produce Google Ads in pages with questions and answers, so it is more suitable for contextual ads. This piece of ad will appear beside the category, at the bottom right of the page.

Tags: adsense

Related entries:

You can comment this FAQ