Set up a Multisite advertising network

Difficulty: Advanced Updated: September 26, 2016

This is a short and brief guide on how to set up a basic advertising network in a WordPress Network. You’ll need a good understanding of WordPress themes, your Network setup and AdRotate Pro to make this work.

If you’re hosting free blogs for people or you plan on doing so it may be beneficial to sell some of that space for advertising campaigns.
This obviously will help you with the upkeep of the network. AdRotate Pro can help you a lot and makes it much easier for you to manage and set up such a network of advertisements from the get go.

This works on any modern WordPress Network enabled installation. And this method is compatible with every theme that works on a Network setup. This means you can make things as crazy as you want or keep it as simple as you please.

Before we begin

I’ll assume the following;

  • You have a basic Network setup working already.
  • You have AdRotate Pro 4.1 or newer.
  • You are a (super)admin with network access.
  • You know basic HTML/CSS/PHP to edit themes.
  • You know how to upload files via something like (s)FTP and know where they belong.
  • You have a AdRotate Pro Developer license.

A regular installation

Installing AdRotate is simple and generally not different than other setups.
Start with uploading the plugin from the dashboard.

Navigate to My Sites > Network Admin > Plugins and click Add new > Upload.

network-install

Next navigate to Installed Plugins and click Network Activate.

network-activate

Activate the license

To enable the cross-site adverts we want you need a valid Developer license. The Single, Duo and Multi licenses do NOT allow for cross site adverts.

When AdRotate Pro is network activated the normal license form in AdRotate Settings is hidden (because your users don’t need to see that) and moved to the Network Admin dashboard. You’ll see a new menu near the bottom named AdRotate. This is were you can activate the license, but also post support tickets in my support system if you need help with AdRotate Pro.

network-license

Network Settings

In the Network Admin menu you’ll also find some basic controls for how your Network will function. Select which website you want to host your banners from. Usually this is the first/primary site of the Network, which has ID 1.

And you can allow blog users to create their own adverts, too. You do this by enabling or disabling the Dashboard checkbox.

network-settings

The network

In this example I’ve set up 2 sub-sites or instances next to the primary (main) site. AdRotate Pro will be managed from the main site called ‘Primary Site’. Every sub-site is called ‘sub1’, ‘sub2’ etc. For this how-to we’ll focus on ‘Primary site’ and ‘sub1’.

network-sites

Get the site ID

If you manage all your adverts from the main site (‘Primary Site’ in this case) the site ID will always be 1 (one).
If you manage your adverts from another site in the network you can best find the site ID by looking at the address bar when you edit said site.

network-siteid

For example; Site ‘Sub1’ has ID 2.

If you add new sites later they will automagically benefit from what you set up now. As long as they use a theme that you have prepared for adverts.

Setting up groups and ads

For this example we’ll use the default demo adverts AdRotate Creates but of course at some point you’re going to need your own adverts. You can create as many adverts and groups as you need. Just like a regular single site setup. You can use every feature AdRotate Pro has to offer just as you would a single site.

I have already created a group ‘Group 1’ with one advert in it ‘Demo ad 468×60’.
Observe the group ID (the number on the left of the group name) because you’ll need it later.

network-group

Preparing your themes

Of-course placing the actual ads is very important. Make sure you are familiar with every theme you offer/use in your network and pick good spots where the adverts will show up. If you’re worried that with theme updates these changes are lost look into making a Child Theme.

Common places;

Header (next to the logo/site title), above or below the main navigation bar, top of the sidebar, footer, between posts, above or below page content.

Where to place ads

Don’t add too many adverts. Your users, if you allow it, may want to add adverts too of their own. I’d keep the sidebar free for that for example.
It’s not uncommon that the super admin (you) who forces the ads in the site adds a large bar along the top for a 728×90 or 2 468×60 adverts above everything else. But that is of course up to you.
In this example I’ll add an advert to the header of the TwentyTwelve theme.

Edit your theme in your favorite editor and edit the appropriate files. In my case this is the ‘header.php’.

network-edit-theme

You’ll see that there is a 4th variable in the group function. This indicates that the advert should be loaded from the primary site you configured in the Network Settings. The 1 is a switch, not an ID.

The Fallback and Weight (2nd and 3rd variables) options are optional and not used here. So they are 0 (false). You can use them if you wish but that’s beyond the scope of this article.

Now save and upload the theme file to your network and you’re done. If there are valid and active adverts in the group you should be able to see that work on the site now.

Results

Since I’ve added the ‘Demo ad 468×60’ to this group I see it on every sub site in the network that uses the TwentyTwelve theme.

network-results

But, there is more

Obviously this article only licks (yep 😉 ) the tip of the iceberg and provides a rather simplistic setup. You can make it as intricate as you think is necessary. Here are some ideas;

  • Using various WordPress functions for Networks you can set up different adverts for every site instance for example.
  • Set up groups for each theme so if your users pick a different theme they get different ads.
  • You can use AdRotate’s Geolocation features to show different kinds of ads for different audiences.
  • The earlier mentioned fallback option could be used to sell the ad-space to your users but if there are no ads sold it could fall back on your own adverts.

All-in-all you have so many options to make money with your sites or network. Why not use them? But be sensible about it and don’t drive people away from the sites with annoying and stupid ads.