Any ideas on how this can be formatted to print out extra attributes in the wp_list_categories()
function?
At the moment, this functions returns the following values:
<ul class="projects">
<li class="wp-post"><a href="category/projects">Projects</a></li>
</ul>
How can I change this function to out put 'id'
and 'title'
tags for both 'li'
and 'a'
elements?
Is there a file somewhere that this can be directly edited or do I need to find a plugin?
The
get_categories()
function will retrieve a list of all the categories and their properties, which you can loop through and output your own HTML.See the
get_categories
documentation for an example.