Show random eBay auction in sidebar using WP Robot





WP Robot Tips : In this post, i want to give another way for showing random eBay auction in sidebar using WP Robot. Wp robot  eBay module can help us to pulling ebay auction into our post, we can put it into single post, or combine it with the others (example : we pull articles, and at the end of it, we put ebay auction).

Pull a single post that containing ebay auction using WP Robot module, will be “unwise” action, because you will get lots of post that have a same post title, with different content. This will become a problems when you use “Delete Duplicate Content” plugins, because all of the new post will be automatically deleted.

Personally, i would like to show every visitor, some eBay auction, but not below my post. I would prefer using sidebar to put this eBay products. There are lots of plugins that could do this, but in this case, i want to show you that WP Robot also powerfull enough, and we can show the result in our sidebar too.

The great news is, when we make a post that containing an eBay products (via WP Robot), every time we refresh that page, the eBay item will be change!. Its kind of pulling a random eBay feed. This parts is my favourite!. Before i continuing the tutorial, maybe you want to see the example?, please see in this site sidebar.

Tutorial to show eBay auction result in sidebar using WP Robot :
1. Make sure that you have an eBay module installed inside your WP Robot, and fill the eBay Affiliate ID in the option page.
2. Create a new categoy that will filled with this auction only, for example use “auction” as the category name.
3. Create a new post for this “auction” category and use any post title as you want, and fill the post with this script :
[eba kw=”wordpress” num=”2” ebcat=”all”]

Change the red colored text with your own keyword. This keyword is something that you want to pull from eBay. For the blue text, that is the number of eBay item that should be shown in this post.
You can create so many post with different keyword to pulled, for example when you have an iPOD site, you can do this :
- post 1 : title = iPod Auction, and fill the post with this : [eba kw=”iPod” num=”2″ ebcat=”all”]
- post 2 : title = iPod Casing, and fill the post with this : [eba kw=”iPod casing” num=”2″ ebcat=”all”]
- post 1 : title = iPod Software, and fill the post with this : [eba kw=”iPod software” num=”2″ ebcat=”all”]
all of that post must be in single category, in this case we use “auction” category.

4. Edit your theme files that controlling your sidebar. A usual theme will use sidebar.php. Find a place to show this eBay auction to show, and put this script :

<?php $recent = new WP_Query("category_name=auction"."&showposts=1&orderby=rand"); while($recent->have_posts()) : $recent->the_post();?>
<?php the_content(); ?>
<?php endwhile; ?>

The blue colored text is the name of your category for that eBay post. After you put that script above, your sidebar will show a random post (only 1 post that will be show) from “auction” category. Sometimes it will show iPod auction, sometimes will show iPod Casing auction, or iPod Software auction.

This tutorial just a simple explanation, you can expand this idea for your own. Please give me feedback, is this trick works or not.

[poll id="4"]

Author: cahyo on July 10, 2010
Category: Tips
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,

Facebook comments:

Leave a Reply


9 + = 11

Last articles