Grow your CSS skills. Land your dream job.

WordPress: Category Archive Page

  • # February 20, 2013 at 4:17 pm

    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?

    # February 20, 2013 at 5:27 pm

    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/.

    # February 20, 2013 at 5:37 pm

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

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".