treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Wordpress: Category Archive Page

  • Total noob at Wordpress, I'm currently reading Digging through Wordpress to help get a good foundation, but I was wondering if someone could help me strategize this blog structure:

    I want the major navigation to feature three categories of posts (Ranting, Writing, and Web Stuff). It'd be nice if the category archive pages had a section of content toward the top I could edit, like an abstract for the category. For example, at the top of "Ranting", I could have some content which describes my various interests, etc.

    With my current knowledge of Wordpress, the first solution that comes to mind is to come up with three different archive page types that have the descriptions hard-coded at the top of the content... this strikes me as complicated and inelegant.

    What would be a better dynamic solution?

  • You can add a description right in the admin panel when you create a category. To display this on the front-end, you then simply need to place the <?php echo category_description( $category_id ); ?> template tag wherever you want it to be printed. Here's the API reference: http://codex.wordpress.org/Function_Reference/category_description/.

  • As I thought, the answer was so simple, I was thinking too complex. Thank you so much!