/**
 * Display a list of categories for a post in The Loop, each represented 
 * by the image uploaded for each. Categories without images are not 
 * shown. You are expected to apply styling to the generated HTML yourself.
 *
 * @param array|string $args 
 * @return string|void Returns the HTML if the echo arg is set to false
 * @author Simon Wheatley
 **/
function ciii_category_images($args = null)
{
    if (isset($args['category_ids'])) {
        $args['term_ids'] = $args['category_ids'];
    }
    return ciii_term_images('category', $args);
}
function ppc_categories($name)
{
    // Home has to be passed in get_sidebar("home");
    if ($name !== "home") {
        return;
    }
    $categories = get_categories(array('orderby' => 'id', 'exclude' => '1'));
    $cat_ids = array();
    foreach ($categories as $key => $category) {
        $cat_ids[$key] = $category->term_id;
    }
    $catstr = implode(',', $cat_ids);
    ciii_term_images('category', array('term_ids' => $catstr, 'size' => 'thumb', 'show_description' => 1));
}