Show Only Category (Not Subcategory) Content
If you ever wanted to only show the content of the category you were on in the category view of WordPress (instead of the category you are on plus all of it's subcategories - you can easily do so by adding the code below to the template that is used to show your category content
You would start your loop with this:
Put your title, content functions here
and where you normally see the
call, put
to close the additional (in_category) if statement.
This code gets the current category and then only displays categories that are in that category (not sub category)
Comments/Pingbacks/Trackbacks
Add a Comment or trackback from your own site.
Larry
July 21st, 2008 at 8:09 pmi tried your code!
and it doesn’t work!
jzelazny
July 21st, 2008 at 9:03 pmSend over your code so I can see it and help you.
Unfarttoof
August 2nd, 2008 at 4:11 pmThank you
Amanda Gillespie
September 12th, 2008 at 2:28 pmThankyouthankyouthankyou! This totally works and was EXACTLY what I needed! Thanks so much.
jzelazny
September 12th, 2008 at 3:06 pmI am glad I could help!