the sidebar.php shows
<li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
</li>
so which php file generates the Categories in the sidebar (wrapped in a
tags and with number of posts)?
the sidebar.php shows
<li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
</li>
so which php file generates the Categories in the sidebar (wrapped in a
tags and with number of posts)?
The function is located inside wp-includes/category-template.php
You can find out where any function is located by looking at the WordPress codex - at the bottom of each page, there is a link to where the function located.
If you're trying to change the output of this function, you can do it with a custom theme filter. Add the following to your theme's functions.php:
function custom_wp_list_categories($categories){
// do something to the $categories returned by wp_list_categories()
return $categories;
}
add_filter('wp_list_categories', 'custom_wp_list_categories');
The benefit of this approach is that it means that if you upgrade WordPress, you don't have to worry about making your changes again to the core files.
Why edit the core when there are so many options to choose from! http://codex.wordpress.org/Template_Tags/wp_list_categories