Ahh, but obviously you missed the “Search First” function.
With a little PHP, you could perform an if/else on the loop section of your index.php, running a check to see if you’re on a category page or not, and only provide the link when you are. Something like the following should work:
if(!empty($cat)) {
Category version of posts.
} else {
Default version of posts.
}
Thread Starter
mrd516
(@mrd516)
Um, I’m afraid I’m still not exactly sure how to accomplish this.
And I did do a search but didn’t find any threads that matched exactly what I was looking for. If you know for a fact I’m overlooking something that may be helpful, please kindly provide a link.
Oh, and save a copy of index.php before moving around in it like this. Better safe…
And you can use the $single variable for individual posts too.
Thread Starter
mrd516
(@mrd516)
The above will provide just the title of each post, as a link, IF you’re on a category page.
Will this only provide the links to the posts according to their respective categories? Sorry, I just wanna be positive this will do exactly what I’m looking to do before attempting it…
And you can use the $single variable for individual posts too.
Adeydas: care to elaborate? Would this be used in conjunction with Kafka’s method, or are you talking about something completely different…?
Anonymous
I think this link will provide your answer:
http://elasticdog.com/2004/10/faking-multiple-templates/#more
You can see it working on my site:
http://www.planetphillip.com
Just click a category on the right menu and you will see just post titles with permanlinks to the posts. I have formatted the way I like but you can of course make it look any way you want.
Will this only provide the links to the posts according to their respective categories?
Yep. WordPress takes care of this automatically on category pages anyway. All you’re doing is verifying you’re actually are on a category page, and acting accordingly.