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.

    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. widget to display posts from specific category
    By andytcfoster in forum Bug report and suggestions.
    Replies: 1
    Last Post: 07-19-2014, 09:46 AM
  2. Replies: 5
    Last Post: 05-08-2014, 02:38 AM
  3. Display full posts in Category
    By priyaarc in forum Support
    Replies: 2
    Last Post: 09-21-2012, 08:28 AM
  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


Posting Permissions

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