<?php
/*
Template Name: Sitemap
*/
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
?>
<?php get_header(); ?>
<div id="wrap" class="clearfix">
	<section id="content" class="primary" role="main">
		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
			<h2 class="page-title"><?php the_title(); ?></h2>
				<div class="entry clearfix">
				<?php
					$cats = get_categories();
					foreach ($cats as $cat) {
					query_posts('cat='.$cat->cat_ID);
				?>
				<h3><?php echo $cat->cat_name; ?></h3>
				<ul>	
				<?php while (have_posts()) : the_post(); ?>
				<li style="font-weight:normal !important;"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
				<?php endwhile;  ?>
				</ul>
				<?php } ?>		
				<h3><?php _e('Pages','pmthemes'); ?></h3>
				<ul>
					<?php wp_list_pages('depth=1&sort_column=menu_order&title_li=' ); ?> 	
				</ul>
				<h3><?php _e('Categories','pmthemes'); ?></h3>
				<ul>
					<?php wp_list_categories('title_li=&hierarchical=0&show_count=1') ?>	
				</ul>	
				</div>
		</div>
	</section>
	<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>	