<?php
/**
 * page.php
 * @tswplain
 */

get_header(); ?>
<div class="wrap">
    <div class="grids">
        <section class="grid-10">
            <section class="grid-7" id="content" role="main">         		
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
			<header class="postmetadata">			
                            <p class="post-author">
                            <?php _e( 'Posted By', 'tswplain' ); ?> <?php the_author(); ?> 
                <?php the_time('F jS, Y') ?> : <?php $numComments = get_comments_number(); echo $numComments;?>&nbsp;
                            <?php _e ( 'COMMENTS', 'tswplain' ); ?> &nbsp;
                            <?php edit_post_link( __( 'Edit', 'tswplain' ) ); ?></p>
                        </header>
		                <article class="content">
			        <?php the_content(); ?>
                                    <?php comments_template(); ?>                                
			        </article>			        
	        <?php wp_link_pages(array('before' => '', 'after' => '', 'next_or_number' => 'number','echo' => '0')); ?>
                                <div id="commentform" class="comment-form">
                                     <?php comment_form(); ?>
                                </div>
                                <p> <?php the_tags(); ?> </p>
		<?php endwhile; endif; ?>
            </section>
                <section class="grid-3">
                <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
                <article id="primary-sidebar"><?php dynamic_sidebar( 'sidebar-1' ); ?></article>
                <?php endif; ?>
                </section>
        </section>
    </div><!-- ends main -->
</div><!-- ends grids -->
<?php get_footer(); ?>