WordPress.org

Ready to get started?Download WordPress

Forums

Creating a default post for a category (9 posts)

  1. waveminded
    Member
    Posted 6 years ago #

    Is it possible when displaying a category to have one post, for example "a disclaimer" or description about the category to always appear at the top of the query, then then posts below it appear chronologically?

  2. Adam Brown
    Member
    Posted 6 years ago #

    Absolutely. In WP Admin -> Manage -> Categories write a description for each category. To display it, use Template_Tags/category_description in your theme somewhere.

  3. waveminded
    Member
    Posted 6 years ago #

    i am so stoked for this feature.

  4. Adam Brown
    Member
    Posted 6 years ago #

    If you're curious to see an example, check out the orangish box at the top of this category on my site:

    http://adambrown.info/b/widgets/category/kb-backtick-comments/

  5. waveminded
    Member
    Posted 6 years ago #

    Is there anyway to have the category description disappear when going to the next page?

  6. waveminded
    Member
    Posted 6 years ago #

    How do you make the category description go away after its displayed once?

  7. Adam Brown
    Member
    Posted 6 years ago #

    You would need to send a custom cookie to the browser the first time somebody views a category, then check for that cookie on future visits.

    Cookies can get tricky. If you've not worked with them before, start with some googling.

  8. lettuce1001
    Member
    Posted 6 years ago #

    Hi! I'm kind of confused... where in the theme code should you put the
    <p><?php echo category_description(3); ?></p>

    THANKS!

  9. moshu
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.