<?php get_header(); ?>
<?php
$aOptions = SofaiBloggr::initOptions( false );
$is_postdetails = $aOptions[ 'is_postdetails' ];
?>
<div id="article" class="section">

	<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
    
	<h1><?php the_title(); ?></h1>
    <div class="postinfo">
        <span class="date"><?php the_time( 'M j, Y' ); ?></span>
        |
        <span class="category"><?php the_category( ', ' ); ?></span>
		| 
        <span class="comments-count"><a href="<?php comments_link(); ?>"><?php comments_number( 'No Comments', 'One Comment', '% Comments' ); ?></a></span>
        <?php edit_post_link( 'EDIT', ' | <span>', '</span>' ); ?>
    </div>
    <?php 
	if( $is_postdetails == 'medium' ) {
		$content = get_the_content();
		$content = apply_filters( 'the_content', $content );
		$content = str_replace( ']]>', ']]&gt;', $content );
		$customized_content = get_cont_custom_size_image( $content, 'medium', $post->ID );
		echo $customized_content;
	} else if( $is_postdetails == 'large' ) {
		$content = get_the_content();
		$content = apply_filters( 'the_content', $content );
		$content = str_replace( ']]>', ']]&gt;', $content );
		$customized_content = get_cont_custom_size_image( $content, 'large', $post->ID );
		echo $customized_content;
	} else if( $is_postdetails == 'thumbnail' ) the_content();
	?>
    <!-- <?php trackback_rdf(); ?> -->
    
    <?php endwhile; else: ?>
    
	<h1>Ups...</h1>
    <div class="postinfo">
        <span class="date">404 or else?</span>
    </div>
    <?php echo 'Page can not be found!'; ?>
    
    <?php endif; ?>

</div><!-- // end article -->

<!-- comments -->
<?php if( 'open' == $post->comment_status ) comments_template(); ?>
<!-- end comments -->

<?php if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'Footer Single' ) ) : ?>
<?php endif; ?>

<?php get_footer(); ?>