Specific and Different Ads for each Post?

I am working with a magazine client who sells adversiting offline in their magazine and now has a WordPress online magazine. Each of their stories is broken into different posts, and they are using the Wootheme Spectrum.

They want the ads in the magazine to correspond to the ads online. So if Story B has Ad Z, then online, Post B should have Ad Z in the sidebar. However, Story A and C might have differents ads.

What’s the best way to accomplish this?

  • Custom plugin?
  • Plugin?
  • Adsense?

Thank you.

3 Answers
3

Hi @ewakened:

The simplest solution would be to have them upload the ads as photos using the media features in WordPress and then to have them add custom field called “Advertisement” with the URL to the ad copied from the media module, and a custom field called and “Ad URL” to link to the advertiser’s site. Then in the theme use the following to retrieve the add’s URL:

<a href="https://wordpress.stackexchange.com/questions/6267/<?php echo get_post_meta($post->ID,"Ad URL',true); ?>">
   <img src="https://wordpress.stackexchange.com/questions/6267/<?php echo get_post_meta($post->ID,"Advertisement',true); ?>" />
</a>

Beyond that is would be very possible to create a custom metabox plugin that would allow them to upload one of more ads directly into the post edit screen but that would require more programming.

Leave a Comment