|

HOW TO ADD A ROTATIONAL AD PLACEMENT WIDGET TO YOUR SIDE BAR

Hey guys! Our last tutorial on how to create a 125×125 ad placement widget went well. And most bloggers like “myself” wants to know how my ad placement widget rotates every time they refresh or click other pages.

125x125 ad placement

On our today tutorial we are going to see how to create a random 125×125 ad placement widget with just a pinch of java script. Hey! Don’t worry because you do not need to know anything about coding, your job here is to copy and paste the below codes.

Now if you’re ready to get the code, let’s proceed.

Now copy the below code to either your blogger blog or your wordpress blog

[php]<div align="center">

<table border="0"  cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">

<tbody><tr>

<td><center>

<!–  BANNER#1  –>

<script language="JavaScript">

images = new Array(2);

images[0] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-1′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

images[1] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-2′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

index = Math.floor(Math.random() * images.length);

document.write(images[index]);

</script>

</center></td>

<td><center>

<!–  BANNER#2  –>

<script language="JavaScript">

images = new Array(2);

images[0] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-1′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

images[1] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-2′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

index = Math.floor(Math.random() * images.length);

document.write(images[index]);

</script>

</center></td>

</tr>

<tr>

<td><center>

<!–  BANNER#3  –>

<script language="JavaScript">

images = new Array(2);

images[0] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-1′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

images[1] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-2′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

index = Math.floor(Math.random() * images.length);

document.write(images[index]);

</script>

</center></td>

<td><center>

<!–  BANNER#4  –>

<script language="JavaScript">

images = new Array(2);

images[0] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-1′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

images[1] = "<a href = ‘URL OF ADVERTISER’ rel=’nofollow’ ><img src=’URL OF BANNER’S IMAGE-2′ border=’0′ height=’125′ width=’125′ alt=’AD DESCRIPTION’></a>";

index = Math.floor(Math.random() * images.length);

document.write(images[index]);

</script>

</td></center>

</tr>

</tbody></table>

<table border="0" bordercolor="#0084ce" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">

<tbody>

<tr>

<td><center><a href="URL OF ADVERTISER" rel="nofollow"><img width="265" height="37" border="0" alt="Advertise Now!" src="../../../Documents and Settings/Mohammad/Desktop/ADVERTISE-HERE.gif" /></a></center></td>

</tr>

</tbody></table>

</div>[/php]

Save the code to your blogging platform and start seeing the adverts rotates.

TO PUT IT IN BLOGGER BLOG: To put it to your blogger blog is also easy. Go to your dashboard and click template. Where do you want the ad placement to be? Click “add widget” on where you want it to be and save it. You have successfully completed the process, now check your blog and see how it beautifies it.

TO PUT IT IN WORDPRESS BLOG: In your wordpress admin section, go to widget and drag the “text” widget to where you want the ad placement to appear. Now paste your prefer code and save it.

Do you have any questions or would like to add up some few things should do by using the comment box below. For your comments are highly appreciated.

Do you like the post? Then click the like button, share us and recommend us with friends. Don’t forget to subscribe to our feed for post on the go.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *