Static text atop each category page? (9 posts)

  1. jbickers
    Posted 12 years ago #

    Does anyone know of an easy way to get a paragraph or two of static HTML/text to display at the top of each category page, before the listing of posts? for the purpose of explaining what goes on in that category?

  2. Anonymous
    Posted 12 years ago #

    I've been looking for the same functionality. Right now it seems to me that WP is missing three key functionalities:
    1. The ability to allocate custom templates to each category.
    2. 'Sticky' posts, as found in Expression Engine.
    3. Multiple blogs from one install. (I know that's coming).
    Don't get me wrong, I think WP is generally a great, quick and easy to use product, I think the community rocks and I am in total support of open source Software. Its just that for my personal CMS needs WP doesn't quite deliver just yet.

  3. charle97
    Posted 12 years ago #

    1. i use customized rewrite rules to have custom templates.
    2. isn't there a plugin for sticky posts?

  4. Beel
    Posted 12 years ago #

    It is my understanding that while #3 is "one the way", the first two can be done, and there are threads explaining #1 and plugins for #2.

  5. charle97
    Posted 12 years ago #

    scroll down Owen's WordPress Hacks page to adhesive. i've never used it, but it looks promising.

  6. charle97
    Posted 12 years ago #

    jbickers, i'd probably use an if statement to check for the category number and utilize an include to insert the text you want from a file.

  7. Scott Reilly
    WordPress & Plugin Dev
    Posted 12 years ago #

    For #1, to show category description at top of category page (I'm assuming that the text you want at the top of the category pages is the description you defined for the category in the Admin section)
    In index.php, look for this:
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    Change it to this:
    <?php if ($posts) : ?>
    <?php if ($cat) : ?>
    <p class="cat-description"><?php echo category_description(); ?>
    <?php endif; ?>
    <?php foreach ($posts as $post) : start_wp(); ?>

    You'll see the category description, and will be able to style it with CSS by addressing the 'cat-description' class.

  8. locomote
    Posted 11 years ago #

    I would like to do this for 1.5 - Is this possible? All help is appreciated.

  9. TomJohnson
    Posted 10 years ago #

    I couldn't find the code you mentioned above that I needed to replace. Is it in a special place for the Blix theme?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.