faster is better than slow | Download Swift
+ Reply to Thread
Results 1 to 3 of 3

Thread: Display Category Description.

  1. #1


    Display Category Description.

    When a visitor clicks on a category link I would like the category description displayed using;

    <div><?php echo category_description(3); ?></div>

    I have a similar function working in the sidebar to just display the category title but would ideally like the description displayed above the category content.

    I have looked for the category.php file in editor but can not find it. I would appreciate some feedback as to which file I need to add the above code to make this happen.

    Thanks
    Last edited by thepeppel1973; 12-23-2011 at 06:52 AM. Reason: better description of function alrady being used

  2. #2


    Case closed. I was after a category.php but obviously couldn't locate this, after investigating a little further I found that the right template to include my code on was the index.php. Also had the wrong code above. The code I ended up using was
    <?php if (is_category()) { single_cat_title(); } ?> for the Category Title and <?php echo category_description( $category_id ); ?> for the description.

  3. #3


    that's not the perfect way to do it, will tell you when I get back to office.

+ Reply to Thread

Similar Threads

  1. Swift Theme Description
    By veteran in forum Showcase
    Replies: 0
    Last Post: 01-17-2012, 11:42 PM
  2. Replies: 2
    Last Post: 11-03-2011, 11:38 AM
  3. Featured Posts Slider Does Not Display if a Category is Selected
    By omgcatbear in forum Bug report and suggestions.
    Replies: 0
    Last Post: 04-24-2011, 10:04 PM
  4. Display category in navba, help me !
    By spteam in forum Bug report and suggestions.
    Replies: 3
    Last Post: 11-11-2010, 11:55 PM
  5. Replies: 0
    Last Post: 05-19-2010, 11:16 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts