INN/Largo — pull request #67 by drywall (2013-03-05 16:49:04+00:00)
Title: Feature/ads

Pull request for work done by Crowd Favorite on the Ads stuff. Connecting to ad networks is a big blind spot for me so I'm hoping what CF has done makes sense to you. If not, we can always ask for clarification. etc.

Here's the documentation they provided:
------------
For ads to work, this plugin must be installed and activated:

http://wordpress.org/extend/plugins/ad-code-manager/
There are three ad sizes: banner, mobile, and widget. They are defined in functions/ad-codes.php.

These are placeholder examples only with no links. The code that is output can be changed in largo_acm_output_html() and can easily be based on the actual tag.

The ads are all placed via widgets for convenience. The Ad Code Manager Ad Zone widget has options to hide on desktops, tablets, and phones.

The header.php file has been modified to put the header widgets in place right before

> Tools >> Ad Code manager.

Add a site name ("Placeholder") and a zone name ('default'). This is necessary for ads to show.

You can also add a conditional (name "Placeholder", zone1 "homepage") with is_home set to true which shows how a different ad code can be passed using the zone1 setting. Conditional logic can be built into functions/ad-code.php to deal with the various zone settings.

All three ad widgets will need to be put into place to display. Go to Admin >> Appearance >> Widgets.

Drag the "Ad Code Manager Ad Zone" widget into Header with these settings:

Title: (blank)
Choose Ad Zone: banner
Widget Background: Default
Hidden on Desktops? unchecked
Hidden on Tablets? checked
Hidden on Phones? checked
Drag the "Ad Code Manager Ad Zone" widget into Main Sidebar with these settings:

Title: Sponsor
Choose Ad Zone: widget
Widget Background: Default
Hidden on Desktops? unchecked
Hidden on Tablets? unchecked
Hidden on Phones? unchecked
Drag the "Ad Code Manager Ad Zone" widget into Footer 1 with these settings:

Title: (blank)
Choose Ad Zone: mobile
Widget Background: Default
Hidden on Desktops? checked
Hidden on Tablets? checked
Hidden on Phones? unchecked