You're browsing: KeithJamesLock.com » phpBay Pro » Blog article: phpBay Pro: The Extended Manual – Inserting phpBay Code Into Theme Files

This eBay Auction Affiliate Tool For WP Is Simply Amazing!

Everyone knows that folks buy and sell stuff like crazy on eBay, but did you know that YOU can EASILY profit from that buying and selling frenzy?

CLICK HERE TO SEE HOW TO EASILY INTEGRATE EBAY AUCTION LISTINGS INTO YOUR SITES AND BLOGS AND GET PAID FOR EACH CLICK!


Use coupon code DA9CD69F42 for 20% off!

phpBay Pro: The Extended Manual – Inserting phpBay Code Into Theme Files

Mon, Aug 3, 2009

phpBay Pro

It's been about a week since my last addition to the phpBay extended manual. My intention was to post a new piece of the manual each day until completion, but you know how things go. I've been quite busy. And, well, I'm going a bit out of order as well. I was going to write about phpBay keyword tracking, and I still will, just not today. I'll get to it soon enough.

This post covers inserting phpBay code into theme files. I came up with a cool idea for using it and thought I'd share it. I have a couple blogs that are 99% hands off, and have automated content, and I wanted a way to insert some auctions to the end of the posts without having to do it manually. Doing it this way you will end up with exactly the same auctions at the end of each post, which won't be as targeted, but it's still proven to work.

You could add some extra php code to show different auctions based on the current category, but I won't get into that here. If I get enough requests in the comments I'll edit this post.

This will be handy if you have an auto-blog on one main topic. I'm sure you can think of some other applications for it, this is just one purpose.

Look through the table of contents below if you want to jump to a different section first. Below the TOC are the quick steps to add phpBay code to your theme files.

Table Of Contents

Remember, phpBay has a sidebar widget you can use, but if you want more control, and want to add auction listings to the bottom of all posts, follow these steps...

  1. In your Wordpress admin panel, go to Appearance -> Editor.
  2. On the right side you should see a file called Single Post (single.php), click it to open up the file in the editor on the left.
  3. In this file there should be a command to show the post content. Look for the_content(). Just below that you can insert the phpBay code.
  4. You can use any and all parameters here just like you would in a post or page, the example below shows just the keyword and the number of posts.

That should do it for you. Tell me some uses you have thought of for adding phpBay code to theme files...

Tags: , , , ,

Related posts:

  1. phpBay Pro: The Extended Manual – Replacing Wordpress Search
  2. phpBay Pro: The Extended Manual – Making The Images Clickable
  3. phpBay Pro: The Extended Manual – Testing
  4. phpBay Pro: The Extended Manual – Installation and Activation
  5. Your Question Answered: Keeping Waiver Sharks In The Loop – WPAds Code For Templates

© Earn a living online in your pj's

Share this post:
http://keithjameslock.com/wp-content/plugins/sociofluid/images/digg_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/reddit_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/delicious_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/technorati_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/google_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/myspace_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/facebook_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/yahoobuzz_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/sphinn_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/mixx_48.png

If you enjoyed this post, make sure you subscribe to my RSS feed!

, , , , , , , , ,

 

Enter your first name and email address below to receive exclusive money making tips.
First Name:
Your Email:
Spam protection; double opt-in:
Using AWeber Autoresponder


$1.99/mo Web Site Hosting Sale at GoDaddy.com!

5 Responses to “phpBay Pro: The Extended Manual – Inserting phpBay Code Into Theme Files”

  1. Chantel Says:

    Hi, I would love to use categories as the keywords for phpbay pro. I am testing to see how much you can make with a site that is on autopilot. If you could help with this, I would be forever grateful and would consider making a donation in return for your help.

  2. Keith James Lock Says:

    Hi Chantel,

    You can use php code in the single.php file to check the category ID and then write phpBay code with your chosen search keyword based on the category. I’ll send you the code in a text file…

  3. Matt Says:

    Ya know, this is like the only site on the net where I found out how to do this. Only trouble is, yours is an image, and my rewriting it gives an error. lol

    Did you ever post the category specific content way somewhere else? Checked around, but didn’t see it.

    Thanks for this!!!

  4. Keith James Lock Says:

    Hi Matt,

    Here’s the code…

    if ( in_category( ‘1′ )) {
    // Insert code here for category 1
    } elseif ( in_category( array( ‘cat-name’, ‘other-cat’ ) )) {
    // This shows a way to do it using category names (multiple)
    } else {
    // any other catgeory
    }

    You can also do it by post using the is_single(‘post#’) command

    Hope that helps…let me know if you have anymore questions…

  5. Matt Says:

    Thanks for the speedy reply!

    Works great!


Leave a Reply