コード内容：カスタム分類の追加例
コードの記述先：functions.php
-------------------------------------------------------
function define_custom_taxonomy(){
    register_taxonomy( 'weather', 'post', array(
        'label' => '天気',
        'hierarchical' => true
    ) );
}
add_action( 'after_setup_theme', 'define_custom_taxonomy' );
-------------------------------------------------------


コード内容：カスタム分類リストを表示する例
コードの記述先：任意のテンプレートファイル内
-------------------------------------------------------
<ul>
<?php
$terms = get_terms( 'weather' );
foreach( $terms as $term ){
    printf( '<li><a href="%s/weather/%s/">%s</a></li>', get_bloginfo( 'url' ), $term->slug, $term->name );
}
?>
</ul>
-------------------------------------------------------


コード内容：カスタム分類リストを表示するウィジェットの実装例
コードの記述先：functions.php
-------------------------------------------------------
class WP_Widget_Weather extends WP_Widget_Categories {
    /**
      * コンストラクタ
      */
    function WP_Widget_Weather() {
        $widget_ops = array(
            'classname' => 'widget_weather',
            'description' => '天気による分類'
        );
        $this->WP_Widget( 'weather', '天気', $widget_ops );
    }
    /**
      * カスタム分類リストを表示する
      */
    function widget( $args, $instance ) {
        extract( $args );
        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '天気' : $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        if ( $title ){
            echo $before_title . $title . $after_title;
        }
?>
        <ul>
<?php
        $terms = get_terms( 'weather');
        foreach( $terms as $term ){
            printf('<li><a href="%s/weather/%s/">%s</a></li>', get_bloginfo('url'), $term->slug, $term->name);
        }
?>
        </ul>
<?php
        echo $after_widget;
    }
    /**
      * ウィジェットの設定フォーム
      */
    function form( $instance ) {
        $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
        $title = esc_attr( $instance['title'] );
?>
        <p>
            <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
            <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
        </p>
<?php
    }
}
register_widget('WP_Widget_Weather');
?>
-------------------------------------------------------