WordPress.org

Forums

Add Static Text to top of Category Archive? (3 posts)

  1. nasim786
    Member
    Posted 5 years ago #

    Hello!

    Forgive me if this has been discussed before, I haven't been able to find what I needed.

    I've been working on a website for my family. We want it to be more interactive, so I am converting static pages to category post archives, changing articles to 'posts', in various categories.

    In this way, a reader can select a category, which will lead them to the latest posts (articles) in that category, with links to older posts. By having the articles as posts, it allows for comments and give-and-take, thus making it more of a social atmosphere.

    My question is this: I would like to have some static text at the top of a few of the category archive pages (before the posts start), each of those pages would have something different.

    Would this be possible by entering in some code on one of the templates? I suspect that it might be possible, but am totally unversed in PHP and could use some help and advice!

    If it is possible, which file(s) would need to be altered, and where/what would need to be inserted?

    If it is not possible, is there some other way to do it?

    I'm using WP 2.8, and the default Kubrick theme

    Thanks for any help!

  2. iridiax
    Member
    Posted 5 years ago #

    Try category descriptions. Add the descriptions in your dashboard's edit categories. You would then need to add the below code to whatever theme file is used for categories (most likely category.php).

    <?php echo category_description(); ?>

    Note: This tag will generate a paragraph around the descriptions.

  3. nasim786
    Member
    Posted 5 years ago #

    Thank you so much!! Simple and elegant, and it works perfectly!!.... I just made the description as an 'h3' so the font would be smaller than the category name! Thanks again!!

Topic Closed

This topic has been closed to new replies.

About this Topic