I am almost done with my humble attempt at a custom CMS using WordPress. The only difficulty I have is making a page display the archive for only one category (and it’s children). Anyone has an idea?
Thanks a lot!
Regis
Leave a Reply
You must be logged in to post a comment.
You can create your own custom archive page using the class WP_Query. Specifically, something like:
You can look at the default theme’s archive.php to get a feel for what else is needed to display a particular category in a layout you are familiar with.
This is what I use to show a list of titles and permalinks for the category “mycategory”; this can go inside the main WordPress loop:
Change the “-1” to “1” to show only the one most recent post; to “10” to show the last 10 posts, etc.