Tag Archives: Wordpress Custom Fields

Cybers Ebay WordPress Plugin

The eBay WordPress Plugin is finally available.

The eBay plugin is very simple but effective. Once installed you input your EbayNetwork Campaign number into the settings, and how many ads you want to appear on each post.

Place the code <?php cybersebay(); ?> within the WordPress loop and you are set.

The first time you use the plugin you will add a Custom Field to your post with the Key name, ebay. And use the value to hold the keyword for this post to import eBay ads. From here on out, whenever you write a post, you can select the custom field key, ebay from the pulldown list and add the keyword you wish to show listings for.

Below is an example from another site. The article is titled “Fun Stocking Stuffers” and the keyword for eBay is “Christmas Stocking Stuffers”

During my testing of the plugin I received a $27 click, and that is certainly the highest valued click I have ever received !

And it is ONLY $17.00 !!

Add to Cart


I am also offering a 50% Affiliate Commission on this product, just click here for the details!


Display Ads Only On Selected WordPress Posts

Every blog is a little different and has it’s own unique requirements. On some blogs we may want to place an ad on every post, on others we may not. A good example is this blog. There are a few posts that I make where I feel an ad is useful and lends itself to have a relevant contextual ad placed on the post.

There is a very simple way to handle this issue.

Yes, there are plugins available that handle all kinds of issues with ads, however, I just wanted an easy way of dealing with it, so here is what I came up with.

Two lines of code and using Custom Fields does the trick,

First I wrap my ads on the single page with this code.

<?php
if (get_post_meta($post->ID, ‘ads’, true)) {
?>

AD CODE HERE

<?php
}
?>

This will cause ads to only show when there is a custom field named “ads” with a value of anything but 0. And once you have inserted the custom field you never have to add it again, just apply a value, and since this is a simple boolean expression, any value except 0 will cause the ads to display.

Examples:

No Ad : Weekly CyberCoder Tweets for 2008-11-30

With Ad : Online Residual Income

You could go the other way and have the default show the ad, or include a couple statements to change the ad location, color or anything else you could think of. This is just a simple solution for a specific need and I hope it helps someone.

If you want more options using basically the same technique I would highly recommend this tutorial, How To Automatically Disable Ads On Selected Posts In WordPress.