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.
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)
- 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.
- 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).
- 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
USING ADROTATE WIDGET
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.
- 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.
USING pHp CODE
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.
- 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.
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.
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!
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.
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)