I’ve been trying to figure out how to seperate individual categories into their own pages with no luck. Rather, I succeeded in seperating categories into their own pages (through the use of some nasty hacks) but, I can’t get the WP generated permalinks to link to those pages. Let me illustrate.
My clients site has two categories that I want seperated; news and articles. I can create a news.php page to show a listing of only the news items, and an articles.php to show a listing of only the article items, but clicking on a permalink to see the whole news item or the whole article takes you to index.php to display the post, not to its respective category page. OK, it might not seem like a big deal but it is. Because of this behaviour, I cannot style my individual news pages and my individual articles pages differently.
Very annoying since the design incorporates different header graphics for news, and differernt header graphics for articles.
The problem seems to lie in how WordPress generates its permalinks. In MT you could choose how you wanted to archive you entries, by date or by category. In WP, permalinks are only generated by date, so it’s impossible to link to an individual post through its category. Ideally, lets say the permalink of a news item called My Cheese Sandwich was in the form of :
A simple mod rewrite would allow the post to be displayed through news.php and not through index.php. This would definately make WP a lot better and very robust, since it would be possible to truly seperate categories.
So what I’m requesting is for a way to change the permalink behavior so that you can choose how you want your archives displayed; by date, or by category. This may be a problem since each post can have multiple categories. A way around this would be to specify the default category for each individual post. So that if one of my posts is in the news, personal, and tech categories, i can choose a default of news so that the post’s permalink will be generated with that category.
Any other thoughts?
- The topic ‘permalink by category’ is closed to new replies.