I’m going to open myself up to random pain-in-the-arse coding help every once and a while. I’m not going to help you make insane dollah-dollah-billz (ask Gilmo for that) but I will help you institute something that’ll make your blog pay for itself. That’s really all you can ask for using eBay Partner Network (unless you’re super popular).
So, to start, I will postpone actually doing this. Feel incredibly free to ask the dumbest questions about php, wordpress and eBay Partner Network. If someone has an idea that you want to steal, but don’t have the balls to ask them for the code, I’ll help you get your rocks off.
Tomorrow, when I get a chance, I’ll look at adding a cute little pertinent eBay ad to the top of your posts (or bottom) or side. He’ll, maybe we’ll float the damn thing so it scrolls. We’ll see.
Maybe You’d Like To Use WordPress’ Custom Fields to create an eBay Partner Network Header!
1. Bam! Make a flash banner and search for “Bowman Chrome AU*”
2. With that flash banner, get the campID and code!
First our Campaign ID: 5336788672 – you should change that.
3. First up, build the php code to grab your Custom Field. (Warrrrning: My <pre>s aren’t wide enough so you’ll have to TRIPLE click the code inside the boxes and paste it into notepad) — Skip to step 6 if you just want the entire code block.
<?php $key="ebay"; $blargh = get_post_meta($post->ID, $key, true); $blargh = str_replace(" ", "*+", $blargh);?>
4. In your eBay Partner code, find “keywords=”
5. and add the bolded code (make sure to add the plus sign after your initial search ‘Bowman Chrome AU*+) — it starts with <?php and ends with ?> — NO SPACES before or after the <?php or ?>
<script charset="utf-8" src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script><script charset="utf-8" type='text/javascript'>document.write('<scr' + 'ipt charset="utf-8" src="http://adn.ebay.com/cb?programId=1&campId=5336788672&toolId=10026&keyword=Bowman+Chrome+AU*+<?php echo $blargh; ?> &sortBy=2&showItems=1&width=468&height=60&font=1&textColor=000000&linkColor=0000AA&arrowColor=8BBC01&color1=4D4DA1&color2=FFFFFF&format=Html&contentType=TEXT_AND_IMAGE&enableSearch=n&useeBayT=y&usePopularSearches=n&freeShipping=n&topRatedSeller=n&showKwCatLink=n&excludeCatId=&excludeKeyword=&catId=212&ctx=n&flashEnabled=' + isFlashEnabled + '&pageTitle=' + _epn__pageTitle + '"></scr' + 'ipt>' );</script>
6. So you’re entire thing looks like this
<?php $key="ebay"; $blargh = get_post_meta($post->ID, $key, true); $blargh = str_replace(" ", "*+", $blargh);?><script charset="utf-8" src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script><script charset="utf-8" type='text/javascript'>document.write('<scr' + 'ipt charset="utf-8" src="http://adn.ebay.com/cb?programId=1&campId=5336788672&toolId=10026&keyword=Bowman+Chrome+AU*+<?php echo $blargh; ?> &sortBy=2&showItems=1&width=468&height=60&font=1&textColor=000000&linkColor=0000AA&arrowColor=8BBC01&color1=4D4DA1&color2=FFFFFF&format=Html&contentType=TEXT_AND_IMAGE&enableSearch=n&useeBayT=y&usePopularSearches=n&freeShipping=n&topRatedSeller=n&showKwCatLink=n&excludeCatId=&excludeKeyword=&catId=212&ctx=n&flashEnabled=' + isFlashEnabled + '&pageTitle=' + _epn__pageTitle + '"></scr' + 'ipt>' );</script>
Now, take that code!
7. and open up your wordpress and click on Editor -> post.php (or single post like single.php)
8. and place that code somewhere before (or at the end) of post_content (or something like that)
9. WHEN YOU MAKE A POST, go to CUSTOM FIELD and add ebay with a value of Josh Sale (or whomever you’re writing about)
10. Ta da! I think you might have some issues placing the code in the right spot in your post.php, so move it around and click update! As long as it’s within the if (have_posts()) loop (ie. after if(have_posts()) you’ll be fine.
11. If you need a hand, ASK!






