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.

Read More

What’s the best way to accomplish this?

  • Custom plugin?
  • Plugin?
  • Adsense?

Thank you.

Related posts

Leave a Reply

3 comments

  1. 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="<?php echo get_post_meta($post->ID,'Ad URL',true); ?>">
       <img src="<?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.

  2. I’d say best way depends on:

    1. How many different ads
    2. How many different posts
    3. How much manual vs programmatic management
    4. Are ads managed by completely in-house staff or will there be externally accessible (like purchasing ads) aspects

    There are plenty off-the-shelf plugins to manage advertisement, I’d try first to compile list and evaluate those.

    For self-developed solution I’d consider factors above to choose:

    • how to store ads (custom post type, meta fields, hardcoded list, etc)
    • how to relate them to posts (for meta fields this solves itself, rest can get tricky)