Posted By

Ashung on 12/04/08


Tagged

wordpress nav


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

suzt808


Wordpress Categories Nav


 / Published in: PHP
 

reference: http://codex.wordpress.org/TemplateTags/wplist_categories

  1. <div class="nav">
  2. <ul>
  3. <?php wp_list_categories('title_li='); ?>
  4. </ul>
  5. </div>
  6.  
  7. <div class="nav">
  8. <ul>
  9. <?php
  10. $variable = wp_list_categories('echo=0&orderby=name&show_count=1&child_of=1&feed=RSS&title_li=');
  11. $variable = str_replace(array(') ('), '</span> <span class="counts">', $variable);
  12. $variable = str_replace(array('('), '<span>', $variable);
  13. $variable = str_replace(array(')'), '</span>', $variable);
  14. echo $variable;
  15. ?>
  16. </ul>
  17. </div>
  18.  
  19. <div class="nav">
  20. <ul>
  21. <?php
  22. $variable = wp_list_categories('echo=0&show_count=1&title_li=');
  23. $variable = str_replace(array('('), '<span class="counts">', $variable);
  24. $variable = str_replace(array(')'), '</span>', $variable);
  25. echo $variable;
  26. ?>
  27. </ul>
  28. </div>

Report this snippet  

You need to login to post a comment.