add text to the top of category page

I want to add the text to top of each category page. I am using a plugin http://wordpress.org/extend/plugins/categorycustomfields/ . With the help of this plugin, i am able to add extra field to my categories, but how can i display that. eg :- if i want to display category description, i used <?php echo category_description(); ?>
similarly, how can i display custom field value.

Related posts

Leave a Reply

2 comments

  1. May I suggest using one plugin that I use for my sites ( I am a web-developer)? I Use Extra category content plugin (http://www.greatwpplugins.com/extra-category-content/) if I want to put any kind of content (text, image, link, etc) before the post listing in a category. Just install the plugin, edit a category to add some extra content and add in the template the code <?php echo the_extra_category_content( ); ?>.

  2. In the admin there’s a description textarea for adding some extra text to each category. In your template file you can show this text via the category_description($cat_id) function.

    Alternatively, you could also use the is_category($cat_id) function to check whether a certain category is being displayed and then do whatever you want in there.

    if (is_category(5))
    {
      // Description for the current category
      echo category_description();
      // Add some extra content
      echo 'This is category number five, yay!';
    }
    

    Note that you can use the category template files as well:

    category-$slug.php > category-$id.php > category.php