This tutorial will show you how to integrate the Ad Management plugin with any WordPress theme. This will allow you choose the exact location you would like to feature your ad zones. Please note that this will require you to have a basic and simple understanding of HTML. There are 5 different zones; header, footer, sidebar, single post, and search box.
Step 1. Open your internet browser and navigate to your WordPress login.
Step 2. Login to your WordPress installation.
Step 3. Click [Presentation] and then [Theme Editor].
Step 4. Locate the file you would like to add ads to on the left side of the screen, labeled theme files. 4.1. Here are the typical names of the files you will edit with its corresponding ad zone: 4.1.1. Header – Add the “Header” code to this file
4.1.2. Footer – Add the “Footer” code to this file
4.1.3. Sidebar – Add the “Sidebar” and “Search Box” code to this file 4.1.4. Single Post – Add the “Single Post” code to this file 4.2. Click on the file you wish to edit.
Step 5. Since all themes are not the same it is difficult to tell you exactly where to place the ad code. This is where knowledge of some basic HTML comes into place. All you have to do is copy and paste the corresponding code into the location of the file where you want the ad to show. This can be done by trial and error. Copy and paste the code into the file, update the file, and see if the ads show in the desired location.
5.1. Here is the code for each zone to be copied:
5.1.1. Header:
<?php
$zheader = stripslashes($GLOBALS['Ad Management']['Options']['z4']) ;
if($zheader != “”) {$zheader =
“<center>$zheader</center>”;}
print $zheader;
?>
5.1.2. Footer:
<?php
$zfooter = stripslashes($GLOBALS['Ad Management']['Options']['z5']) ;
if($zfooter != “”) {$zfooter =
“<center>$zfooter</center>”;}
print $zfooter;
?>
5.1.3. Sidebar:
<?php
$zsidebar = stripslashes($GLOBALS['Ad Management']['Options']['z2']) ;
if($zsidebar != “”) {$zsidebar =
“<li><h2>Featured</h2><ul>$zsidebar</ul></li>”;} print $zsidebar;
?>
5.1.4. Single Post:
<?php
$zsinglepost = stripslashes($GLOBALS['Ad Management']['Options']['z3']) ;
if($zsinglepost != “”) {$zsinglepost = “<p><center>$zsinglepost</center></p>”;} print $zsinglepost;
?>
5.1.5. Search Box:
<?php
$zsearchbox = stripslashes($GLOBALS['Ad Management']['Options']['z1']) ;
if($zsearchbox != “”) {$zsearchbox = “<center>$zsearchbox</center>”;}
print $zsearchbox;
?>
Step 6. After you have finished replacing the two pieces of code, click on [Update File] in the bottom right hand corner of the page.
Step 7. You’re done!
Remember: You will have to do this process for each individual theme. So if you change your theme to your blog, you will need to update the Header, Footer, Sidebar, and Single Post files as outlined above. Also remember you must have the Ad Management plugin installed and active for this to work. Make sure you copy and paste your ad code into the correct fields from within the WordPress admin panel >> Options >> Ad Mangement.