Posted By

santonsujarwo on 03/12/11


Tagged

categorywordpress


Versions (?)

show category description in wordpress


 / Published in: PHP
 

URL: http://atharasicreative.com

  1. <ul>
  2. <?php if (get_option('pov_home_link')) : ?>
  3. <?php endif; ?>
  4. <?php foreach ( (get_categories('exclude='.get_option('pov_cat_ex') ) ) as $category ) { if ( $category->category_parent == '0' ) { ?>
  5. <li>
  6. <a href="<?php echo get_category_link($category->cat_ID); ?>"><h3><?php echo $category->cat_name; ?></h3></a> <h4><?php echo $category->category_description; ?></h4>
  7. <?php if (get_category_children($category->cat_ID) ) { ?>
  8. <ul><?php wp_list_categories('title_li&child_of=' . $category->cat_ID ); ?></ul>
  9. <?php } ?>
  10. </li>
  11. <?php } } ?>
  12. </ul>

Report this snippet  

You need to login to post a comment.