• I am looking for a solution to put a small intro on top of a category. When you click on the category tag it brings you to a page with every post under that category. I would like to add a paragraph to the top of that page where I can have an intro the category topic.

    Using a sticky plug in doesn’t work because that post shows up under the all post section.

    Any ideas on how to accomplish this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try using the category description in Posts/Category and then amend your category template file to display the category description.

    Thread Starter spikoley

    (@spikoley)

    Thanks for the reply. I don’t have a category template file to edit. Any other ideas on how to accomplish this? Is there a plugin I can use?

    If your theme doesn’t have a category.php file, it will be using archive.php or index.php (in that order).

    Thread Starter spikoley

    (@spikoley)

    I only have a index.php file. Inside the file category is mentioned once.

    <div id=”post-<?php the_ID(); ?>” class=”node clearfix node-story node-teaser published promoted <?php if (is_sticky()): ?>sticky<?php endif; ?> without-photo”>
    <div class=”meta”>
    <h2>“><?php the_title(); ?></h2>
    <p>Posted <abbr class=”created”><?php the_time(‘M.d, Y’) ?></abbr> by <?php the_author_posts_link(); ?>, under <?php the_category(‘, ‘); ?></p>
    <div class=”terms”>
    <?php the_tags(‘<span class=”icon”> </span>’, ‘, ‘, ‘ ‘); ?>
    </div>
    </div>

    From the link you provided me it looks like I need to add <?php echo category_description( $category ); ?>.

    I am new to PHP and I haven’t been able to get it to work. Where would I put that line?

    Thread Starter spikoley

    (@spikoley)

    I got it working! Thanks for you help. Now I just need to tweak it.

    Thread Starter spikoley

    (@spikoley)

    Actually, that solution is not going to work. It ads the category to each post. I just want a paragraph at the top of the category when you view by category.

    Any other idea? Maybe a way to create a page and then have the category show up below the page?

    You need to add <?php echo category_description( $category ); ?>. before the Loop – not inside it.

    In WP 3.0.1 there is a new feature, when you edit the properties of a category (click on the Category link from the left sidebar in the admin panel, find the category you want to add the description to and click the edit link) you can now add an Introductory Headline and Introductory Content to each category.

    Inside the Introductory Content section you can even use html to add images and style the content. Now when you go to a category archive your information will show at the top of the page.

    It’s about time something like this was made available. Now if they would make it this easy for Author archives…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Intro To Categories’ is closed to new replies.