Wordpress plugin to manage and display custom ads manually
- Wordpress 3.0+
- PHP 5.3+
- Activate plugin
- Add Ad Formats
- Leaderboard
- Skyscraper
- See http://en.wikipedia.org/wiki/Web_banner#Standard_sizes
- Add Ad Locations and select a Format for each Location
- Header
- Footer
- Go to Ads » Add New
- Select a Format
- Selecting a Format will apply this term and overwrite any other « Format » term because only one Format is possible at any time
- TODO: Format detection on upload
- Upload the banner
- TODO: Support Flash
- Optionnally add a link
TODO: Add weights in the random
Use SimpleAds\Ad::query_random($location)
or SimpleAds\Ad::query($location)
for all possible banners
Example:
<?php
$banner = SimpleAds\Ad::query_random('header');
if ($banner) $banner->render();
?>
Which outputs:
<a href="/banner-target.html" title="Awesome banner">
<img width="728" height="90" src="http://example.com/wp-content/uploads/2012/05/banner.png" class="attachment-ad-leaderboard" alt="Awesome banner">
</a>