Using The Wordpress Search Box To Search Ebay Listings

By Ben | Aug 11, 2008

Hi everyone.

Whether you are new to phpbay or you are an advanced user you will know how annoying it is to have a search box in your wordpress site that will only search your pages and posts, this is a particular problem when your site is more ecommerce based than blog based. A solution was published to this but since the version of phpBay was upgraded you will have found that the origional search.php mod no longer works with the newer versions……until now! If you have been keeping an eye on the forum you will notice that Wade has posted the instructions for this mod to work with phpbay pro version 3.0 and above.

You can see the instructions here or get them from below:

################################################
Getting Your Wordpress Search Box To Search eBay Listings…………BACKUP YOUR FILES!
################################################

To edit the search.php file, it’s pretty much the same for most of them, but sometimes they are a little different.

Open up the search.php file.

Look for this line: <?php if(have_posts()) : ?>

This is where I typically start the paste of the search code.

Scroll towards the bottom and find this line: <?php endif; ?>

This is almost always where the end of the code is to paste over. So we have the start and end point of where the search code will be copied.

The actual search code, for phpBay 3.x is:

###############################################

<p align=”center”>Your search for ‘<strong><font color=”#FF0000″><? echo $_GET["s"] ?></font></strong>’ returned the following results:</p>
<p>
<?php
function phpBaySearch($term) {
$keyword = $term;
$category = “”;
$text .= ‘[phpbay]‘ . $keyword . ‘,20,’ . $category . ‘, “”[/phpbay]‘;
echo phpBayPro($text);
}
phpBaySearch($_GET["s"]);
?>
</p>

##############################################

So, to add this search, just copy the search code directly above, then in the search.php file, paste it over the existing code, starting from:

<?php if(have_posts()) : ?>

to

<?php endif; ?>

You actually overwrite these to lines, the start and the end, and everything in between.

Save and upload, then try a search query. This should work for most themes.

This should work with most wordpress themes, but please please as always remember to backup any files before you start editing, its really simple, just change the filename to search.php,bak and if all else fails you can resort to the original file.

Good luck!

Building A phpBay Pro Site

By Ben | Aug 11, 2008

When I first got into phpbay I used a tutorial from eureka diary which I had recommended to me by Melissa Eaton, the tutorial was really helpful in guiding me through a step by step process. It will be my aim in the very near future to carry out a series of tutorial posts about building a site with phpbay but for now I highly recommend you check out this post:

The phpBay Building Tutorial

Welcome to my blog!

By Ben | Aug 11, 2008

Welcome to my blog everyone and thanks for visiting. My name is Ben Johnson and I am an affiliate marketer of about 2 years. I started off back in 2006 using Build A Niche Store (AKA BANS!) I have built up around 20-25 decent BANS sites which make me a good income, however I recently came across the phpBay script which I immediately snapped up and have been using ever since. I guess in a way I found getting started with phpbay easier than I would have if I had not already been working with BANS, after all its not really the process of building stores which challanges people, its usually the making them profitable part that people struggle with.

I feel that all in all I have been able to gain quite a lot of knowledge about building affiliate stores, having said that there is still so much to learn. However, the aim of my blog will be to help people to get started using phpbaypro, whilst maybe looking at other affiliate scripts from time to time. I really hope you enjoy the posts I make.

© 2007 Succeed With phpBay, - Daily Blog Tips Themes