Ad Code Manager
Ad Code Manager gives non-developers an interface in the WordPress admin for configuring your complex set of ad codes. Some code-level configuration may be necessary to set up Ad Code Manager. Ad tags must be added (via do_action() ) to your theme’s template files where you’d like ads to appear. Alt
Ad Code Manager gives non-developers an interface in the WordPress admin for configuring your complex set of ad codes.
Some code-level configuration may be necessary to set up Ad Code Manager. Ad tags must be added (via do_action() ) to your theme’s template files where you’d like ads to appear. Alternatively, you can incorporate ad tags into your website with our widget and shortcode. Check out the configuration guide below for the full details.
A common set of parameters must also be defined for your ad provider. This includes the tag IDs used by your template, the default URL for your ad provider, and the default HTML surrounding that URL. Ad Code Manager supports Google DoubleClick For Publishers (and Async), and Google AdSense. All the logic is abstracted, however, so configuring a different provider is relatively easy. Check providers/doubleclick-for-publishers.php for an idea of how to extend ACM to suit your needs.
Once this configuration is in place, the Ad Code Manager admin interface will allow you to add new ad codes, modify the parameters for your script URL, and define conditionals to determine when the ad code appears. Conditionals are core WordPress functions like is_page(), is_category(), or your own custom functions that evaluate certain expressions and then return true or false.
Fork the plugin on Github and follow our development blog .
Configure Ad Code Manager to manage the advertisements on your site
Ad Code Manager is a VIP-sponsored plugin designed to make managing the ad codes used to display advertisements on your site easier. There’s a little bit of work you’ll need to do upfront to integrate Ad Code Manager with your theme.
The high-level idea behind Ad Code Manager is that it gives non-developers an admin interface to manage ad codes. It then permits users to (optionally) target specific ad codes using conditionals like is_home() and is_single() . Ad codes are associated with positions in the theme through the use of ad tags.
Currently, Ad Code Manager easily integrates with Google DoubleClick For Publishers Async and Google AdSense. Other ad providers are supported with additional configuration.
Google AdSense and DoubleClick For Publishers Async
Let’s use AdSense as our first example. You’ll want to incorporate some of the default ad tags into your theme by use of do_action() . Here’s an example you might put in your header.php file:
do_action( 'acm_tag', '728x90_leaderboard' );
Once done, you can select the “Google AdSense” provider in the admin. Ad codes can be registered against ad tags (positions) by choosing the ad tag from the drop-down, entering the tag ID and publisher ID, and hitting “Add New Ad Code”.