<?php
/**
 * The Template for displaying all single posts.
 *
 * @package Serpentsoft
 * @subpackage Adams_News 1.0
 * @since Adams News 1.0
 */
get_header(); ?>

<!-- main content -->
<article itemscope itemtype="http://schema.org/Article" role="main" <?php post_class("article-container"); ?>>
    <div class="row-fluid">

        <?php $get_meta = get_post_custom($post->ID); ?>

        <?php while (have_posts()) : the_post(); ?>

            <div class="article-content">
                <header>
                    <?php serpentsoft_single_breadcrumb(); ?>

                    <div class="figure-container"><?php serpentsoft_post_banner_show(); ?></div>

                    <h1 itemprop="headline"><?php the_title(); ?></h1>
                    
                    <?php serpentsoft_single_meta_info(); ?>
                    
                    <?php //$plugin_title = get_option('arr_options'); echo $plugin_title['title'] . ' - ' . $plugin_title['color']; ?>
                </header>

                <span class="clearfix"></span>

                <div class="post-entry" itemprop="articleBody">
                    <?php if (isset($get_meta['serpentsoft_post_review_types'][0]) && $get_meta['serpentsoft_post_review_types'][0] != 'disabled') {
                        switch ($get_meta['serpentsoft_post_review_position'][0]) {
                            case 'top': {
                                    serpentsoft_post_reviews();
                                    the_content();
                                }
                                break;

                            case 'bottom': {
                                    the_content();
                                    serpentsoft_post_reviews();
                                }
                                break;

                            /* case 'topbottom': {
                                    serpentsoft_post_reviews();
                                    the_content();
                                    serpentsoft_post_reviews();
                                }
                                break; */

                            default:
                                the_content();
                                break;
                        }
                    } else {
                        the_content();
                    } ?>

                    
                    <?php $args = array(
                            'before'           => '<div class="page-link">',
                            'after'            => '</div>',
                            'link_before'      => '<span class="page-current">',
                            'link_after'       => '</span>',
                            'next_or_number'   => 'number',
                            'nextpagelink'     => __('Next page', 'serpentsoft'),
                            'previouspagelink' => __('Previous page', 'serpentsoft'),
                            'pagelink'         => '%',
                            'echo'             => 1
                    );
                    wp_link_pages($args); ?>
                    
                </div>

                <div class="clearfix"></div>

            <?php serpentsoft_post_social_share_buttons(); ?>

            </div>

            <?php endwhile; // end of the loop.  ?>

        <!-- Article Footer Start from author bio to comments box  -->
        <footer>

        <?php while (have_posts()) : the_post(); ?>

            <!-- Post Tags -->
            <?php serpentsoft_single_tags_box(); ?>

            <!-- Author Biography -->
            <?php serpentsoft_single_author_bio(); ?>

        <?php endwhile; // end of the loop. ?>

            <!-- Related Posts -->
            <?php serpentsoft_single_related_posts(); ?>    
            <?php wp_reset_query(); ?>
            
            <?php while (have_posts()) : the_post(); ?>            
                <!-- Posts Navigator -->
                <?php serpentsoft_single_navigation(); ?>
            <?php endwhile; ?>
            <?php wp_reset_postdata(); ?>

            <!-- Members Comments -->
            <?php if( serpentsoft_get_data('serpentsoft_switch_wp_comments_box') && serpentsoft_get_data('serpentsoft_switch_wp_comments_box_article') ){
                if (comments_open()): comments_template('', true); endif;
            }
            /* This Method dont't grab WP Comments Box in Single File */
            serpentsoft_comments_box(); ?>
            
        </footer>
    </div>
</article>

<!-- Closing Span6 Main Content -->
<?php get_footer(); ?>