KoderyBeta

Custom wp_list_categories Function

Category: WordPress - Owner: PaulDavis - Owner ID: 1

This specific snippet adds a rel tag with a lower-case name.

Not 100% sure where to find column names to get the data from.

<?php
	$args = array('orderby' => 'name','order' => 'ASC','exclude' => '1','hide_empty' => '0');
	$categories = get_categories($args);
	foreach($categories as $category) { 
		echo '<li><a href="' . get_category_link( $category->term_id ) . '" rel="' . strtolower(str_replace(' ', '-', $category->name)) . '" ' . '>' . $category->name.'</a></li>';
	} 
?>