WordPress.org

Ready to get started?Download WordPress

Forums

Static text atop each category page? (9 posts)

  1. jbickers
    Member
    Posted 9 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?
    Best,
    James

  2. Anonymous
    Unregistered
    Posted 9 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.
    Andy.

  3. charle97
    Member
    Posted 9 years ago #

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

  4. Beel
    Member
    Posted 9 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
    Member
    Posted 9 years ago #

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

  6. charle97
    Member
    Posted 9 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. 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
    Member
    Posted 9 years ago #

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

  9. TomJohnson
    Member
    Posted 8 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

Tags

No tags yet.