Need paid help! Print a phrase depending on the category name.
-
Hello!
I’m willing to pay $10 by Paypal if you give me this simple hack!
This should be very easy if you know the right variables, but I’ve searched, and searched, and nothing…
The hack must work in the single page where the post is shown, because I want to print a a different phrase depending on the name of the category, at the bottom of each article.
The code can be put on the single.php file.For example, if the category is called dogs, I would like to print the phrase: Dogs are the man’s best friend.
If the category is called “giant animals”, I would like to print: Elephants and wales are examples of big animals.
Well, the examples are dumb, but you get the picture ??This could even be used to print different images depending on the category name. If the post is in the category dogs, you could show an image of a dog at the bottom of each article!
The real problem is doing that in the single page, not in the category main page :/So, I only need a simple case structure, linked to the right variable, that can be called on the every page of my blog.
I can’t use functions like the_category(); because it prints a character, so the if clauses or cases don’t work.I use WordPress 2.0.
Thank you!!!
Nuno
- The topic ‘Need paid help! Print a phrase depending on the category name.’ is closed to new replies.