<?php
/*
 * Template Name: Sitemap
*/

get_header();
?>

	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<div <?php post_class(); ?>>
			<h1><?php the_title(); ?></h1>
			<div class="entry">
				<?php the_content(); ?>

				<?php if(get_option('theme_sitemap_feed')==true) { ?>
				<h2><?php _e('Feeds'); ?></h2>
				<ul class="xoxo feeds">
					<li><a href="<?php bloginfo( 'rdf_url' ); ?>" title="<?php _e('RDF/RSS 1.0 feed'); ?>"><?php _e('<acronym title="Resource Description Framework">RDF</acronym> <acronym title="Really Simple Syndication">RSS</acronym> 1.0 feed'); ?></a></li>
					<li><a href="<?php bloginfo( 'rss_url' ); ?>" title="<?php _e('RSS 0.92 feed'); ?>"><?php _e('<acronym title="Really Simple Syndication">RSS</acronym> 0.92 feed'); ?></a></li>
					<li><a href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php _e('RSS 2.0 feed'); ?>"><?php _e('<acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed'); ?></a></li>
					<li><a href="<?php bloginfo( 'atom_url' ); ?>" title="<?php _e('Atom feed'); ?>"><?php _e('Atom feed'); ?></a></li>
					<li><a href="<?php bloginfo( 'comments_rss2_url' ); ?>" title="<?php _e('Comments RSS 2.0 feed'); ?>"><?php _e('Comments <acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed'); ?></a></li>
				</ul>
				<?php } if(get_option('theme_sitemap_page')==true) { ?>
				<h2><?php _e('Pages'); ?></h2>
				<ul class="xoxo pages">
					<li><a href="<?php bloginfo( 'siteurl' ); ?>" title="<?php bloginfo( 'name' ); ?>"><?php _e('Home'); ?></a></li>
					<?php wp_list_pages('title_li=&exclude'.get_option('theme_omit_pages')); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_post')==true) { ?>
				<h2><?php _e('Blog Posts'); ?></h2>
				<ul class="xoxo post-archives">
					<?php wp_get_archives( array( 'type' => 'postbypost' ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_category')==true) { ?>
				<h2><?php _e('Category Archives'); ?></h2>
				<ul class="xoxo category-archives">
					<?php wp_list_categories( array( 'feed' => __('RSS'), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_author')==true) { ?>
				<h2><?php _e('Author Archives'); ?></h2>
				<ul class="xoxo author-archives">
					<?php wp_list_authors( array( 'exclude_admin' => false, 'show_fullname' => true, 'feed' => __('RSS'), 'optioncount' => true, 'title_li' => false ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_yearly')==true) { ?>
				<h2><?php _e('Yearly Archives'); ?></h2>
				<ul class="xoxo yearly-archives">
					<?php wp_get_archives( array( 'type' => 'yearly', 'show_post_count' => true ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_monthly')==true) { ?>
				<h2><?php _e('Monthly Archives'); ?></h2>
				<ul class="xoxo monthly-archives">
					<?php wp_get_archives( array( 'type' => 'monthly', 'show_post_count' => true ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_weekly')==true) { ?>
				<h2><?php _e('Weekly Archives'); ?></h2>
				<ul class="xoxo weekly-archives">
					<?php wp_get_archives( array( 'type' => 'weekly', 'show_post_count' => true ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_daily')==true) { ?>
				<h2><?php _e('Daily Archives'); ?></h2>
				<ul class="xoxo daily-archives">
					<?php wp_get_archives( array( 'type' => 'daily', 'show_post_count' => true ) ); ?>
				</ul>
				<?php } if(get_option('theme_sitemap_tag')==true) { ?>
				<h2><?php _e('Tag Archives'); ?></h2>
				<p class="tag-cloud">
					<?php wp_tag_cloud( array( 'number' => 0 ) ); ?>
				</p>
				<?php } ?>
			</div>
		</div>

		<?php display_comments(); ?>
	
	<?php endwhile; else: ?>
  
		<?php include (TEMPLATEPATH . '/404.php'); ?>     
	
	<?php endif; ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>