thank you for replying.
category 5 is my ebook category. All categories that are a child of category 6 are subjects that an ebook is on.
an ebook post will also appear in one the subject categories, along with other posts.
Basically, when viewing a single post within category 5 ie an ebook, i want to display in a floated div, an image and paypal button for that ebook. On posts in a category that is a child of category 6...I want to show in a floated div the ebook for that 'subject' but instead of a paypal button, just show a link to the ebook's post. I can do the necessary for the div / paypal but it is just how to work out which, if any, of the 2 options, I had to do, from within my single.php
If the post is in a category that is a child of 6, ie it is related to a particular subject, I will then have to get the necessary ebook's info to display.
If that makes sense?