[resolved] category-specific header (4 posts)

  1. morgentau
    Posted 8 years ago #

    hi all

    i have a category on my sidebar called "photography" to which i regularly add posts containing photographs. these posts sometime contain a lot of text, and i'd like to allow access to a unified gallery of all photographs without any text (this could be an updated "page" instead of a post). i would like to know if it's possible to do the following from within a theme: when the user clicks on the "photography" category, have wp display as the first thing on the page, just above the last post, a formatted box notifying the user that all the photographs included in all the posts can be viewed together, and provide a link.

    i assume this involves a simple "if" statement involving the category id but i don't know where it should go (if it's at all possible without modifying core functions).


  2. moshu
    Posted 8 years ago #

    You don't need ever to modify core files or functions to display something on a category listing/archive = that's what we call when you click on a category name (like photography).
    This should get you in the right direction:

  3. morgentau
    Posted 8 years ago #

    thanks a lot, it did. i didn't know category templates existed. all the best :)

  4. moshu
    Posted 8 years ago #

    Then learn about the rest of the templates, too :)

Topic Closed

This topic has been closed to new replies.

About this Topic