WordPress Tweaks & Tuts?

Subscribe to TheCreatology via RSS | Email

How to Add New Ad Slot in WordPress Theme using Adrotate Plugin

by Aky Joe

An Advertisement-Ready Website, a recent project by TheCreatology, was configured with Adrotate Plugin. The plugin has extensive features for Ad management, Click Tracking & Campaign Management etc. with detailed reporting, which also we will be using in our Tutorial. This tutorial is a request from a client, which is Quick-n-Easy tutorial, as we will learn to add new advertisement slot using adrotate in WordPress theme.

Get Started - Add Ad Slot Using Adrotate

Add New Ad Slot Using Adrotate

For your ease, I have divided this tutorial into three sections: 1) Add/Install Adrotate Plugin, 2) Add/Create New Ads with Adrotate & 3) Display Ad Slot Code in Theme

Step 1: Add/Install Adrotate Plugin

To install WordPress Adrotate plugin, login to WordPress dashboard:

  • Navigate to Dashboard > Plugins > Add new Plugin.
  • Search for Adrotate plugin and click to install it.(Refer to screenshot below)
Step1 Install adrotate plugin

Install Adrotate WordPress Plugin

  • Once the plugin is installed, click on Activate link to complete the installation of plugin.

Now that we are done with the installation of plugin, we can move on to create new ad banners.

Step 2: Add/Create New Ad Banner with Adrotate

Adding new ads is just a click-a-way thing and a bit of focus is required. Follow quick steps below:

  • Login to WordPress Dashboard and navigate to Dashboard > Adrotate
  • Click on Add New to add ad banner just like in the screenshot below.
Step2-1 Add New Ad in Adrotate

Navigate to Adrotate Management Screen

  • In next screen, you will see a form prompting about new Ad details. Fill the required fields that is Title, Ad Code & Display Period. (Note: Advance Settings are optional, depending upon your requirement.)
  • For your reference, you can memorize Ad unit ID, which will be required in Step 3 (refer the screenshot).
Step2-2 Add New Ad in Adrotate

Add new Ad unit

  • Hit Save Ad button once done.

Step 3: Display Ad Slot in Theme

In our previous step, we added Ad Unit, where as this step will integrate Ad Code in theme. Adrotate Ad Unit can be displayed in two ways: 1) Using Adrotate Widget & 2) Using Short Code or PHP Code


This is an easy method and recommended option for people who don’t like to code. Follow simple steps below to display ad slot using adrotate widget:

  • Login to WordPress Admin and Navigate to Dashboard > Appearances > Widgets.
  • In the available widgets, Drag Adrotate Widget to the Widgetized Area, just like in screenshot below.
Step3-1 Display Ad Using Adrotate Widget

Display Ad in Sidebar using Adrotate

  • Type-in, the desired Ad unit ID, which you memorized while creating Ad Unit in Step 2. If you are not sure about the ID, simply Navigate to Dashboard > Adrotate and find the Ad Slot ID
  • Hit Save button to update the changes.


A bit complex method, as you either need to have developer skill-set or a developer to fix it, as a slight mistake may end up breaking theme layout or crash the website. The method comparatively is more flexible than Adrotate Widget method, as you can display any size Ad Unit anywhere in your Theme. To do so, follow steps below to display ad slot using php code:

  • Login to WordPress Admin and Navigate to Dashboard > Adrotate.
  • Click the desired Ad unit you want to embed in your Theme.
  • Scroll down a bit till you see Usage section similar to screenshot below.
Step3-2 Display Ad Using PHP Code

Adrotate Ad unit PHP code

  • Copy the php code <?php echo adrotate_ad(#WILL VARY IN YOUR CASE#); ?>
  • Paste, the code in your theme layout file, for instance header.php or single.php as desired.
  • Save & upload file to server using FTP.

We’re Done

Now that you have added ad unit code in the theme, refresh webpage to preview the ad slot. Works fine ? Bravo, we are done with the tutorial.

Not Working ‘eh ? Recheck the codes, make sure you have uploaded the right file and clear cache, in case you are using cache plugins. Go through the Step 2 & Step 3 again, till you see the ad unit live in action. 😉

In this tutorial we learned about adding a new ad slot in WordPress Theme using Adrotate Plugin. If you have any queries or further assistance is required, post us your feedback using the comment form below.

Similar Topics: , , ,

TheCreatology Support

Got a Query? We're ready, Just Say it!

If you have a doubt or a feedback, then get-in-touch with TheCreatology Support Team now.

Start a Hangout or Email Us

Are you looking for...

  • Logo Design
  • Web Development
  • Thesis Skin Design
  • Graphic Designing
  • Virtual Assistance
Hire Us!


{ read them below or add one }

National Association of Solution Providers and Channel Partners September 4, 2012 at 3:26 am

Thanks for mentioning the plugin and the tutorial. We’ve already installed it and are looking forward to using it.
We will also be revisiting mailchimp to see if we can’t work with that in the future. Very helpful site.


M November 29, 2012 at 6:42 am

Hi, Thanks for this tutorial! Everything worked until after step 3. When I go into the site to see if it worked it’s a tiny square (not even close to the width of my sidebar).
I tried re-sizing it to be 250×250 and then tried leaving it large at 950×950 but neither is working…
Please advise.
Thanks in advance!


Aky Joe November 30, 2012 at 8:00 pm

Adrotate Plugin act as a bridge between PHP and HTML which means that it doesn’t add any style or media to it. You will have to add some CSS in HTML code to make it fit in the sidebar.


brandy February 19, 2013 at 4:20 am

this was super helpful! after kludging around with the wordpress functions i was finally able to get adrotate working like i wanted to. i am using WP super cache and it kept on just leaving out the adrotate. which is totally baffling. (not the not-rotating-because of cache problem, it just wouldn’t insert it)


Leave a Comment

Previous post:

Next post:

Contact Aky

Yes, I agree that all information above is valid.

Simple question, what's...