<?php 
$post_id = edumodo_get_id();
$edumodo_learndash_course_style_1_widget_divider = edumodo_get_theme_mod('edumodo_single_ld_course_widget_divider_trigger', 'on');
$edumodo_learndash_course_style_1_tag = edumodo_get_theme_mod('edumodo_single_ld_course_post_tags_trigger', 'on');
$edumodo_learndash_course_style_1_social_share = edumodo_get_theme_mod('edumodo_single_ld_course_social_trigger', 'on');
$edumodo_learndash_course_style_1_related_course = edumodo_get_theme_mod('edumodo_single_ld_course_related_course_trigger', 'on');
$related_course_style = edumodo_get_theme_mod('edumodo_single_ld_related_course_style', '2');
$related_course_count = edumodo_get_theme_mod('edumodo_single_ld_related_course_per_page', 3);

?>

<div class="container">
    <div class="row">
        <div class="col-md-8 content-wrapper">
            <?php
            while ( have_posts() ) : the_post(); ?>

                <div id="post-<?php the_ID(); ?>" <?php post_class('single-post'); ?>>

                    <?php if ( has_post_thumbnail() ) : ?>
                        <figure class="post-thumbnail">
                            <?php the_post_thumbnail(); ?>
                            <?php if(is_sticky()): ?>
                                <div class="post-triangle">
                                    <span>
                                        <i class="glyph-icon flaticon-star"></i>
                                    </span>
                                </div>
                            <?php endif; ?> 
                        </figure>
                    <?php  endif; ?>

                    <div class="entry-content">
                        <?php 
                            the_content(); 
                            wp_link_pages(
                                array(
                                'before'      => '<div class="page-links">' . esc_html__( 'Pages:', 'edumodo' ),
                                'after'       => '</div>',
                                'next_or_number'   => 'number',
                                'link_before' => '<span class="page-number">',
                                'link_after'  => '</span>',
                                ) 
                            );
                        ?>
                    </div>

                    <footer class="entry-footer-body">

                        <?php if($edumodo_learndash_course_style_1_tag == 'on'): ?>
                            <div class="post-meta pull-left"> 
                                <?php if(has_tag()):?>
                                    <!-- Post tag -->
                                    <span class="post-tags-title"><?php esc_html_e( 'Tags:', 'edumodo' ); ?></span>
                                    <span class="post-tags"><?php the_tags('', ', ', '<br />'); ?></span>
                                <?php endif;?>
                            </div>
                        <?php endif; ?>

                        <div class="edit pull-left">    
                            <?php
                                edit_post_link(
                                    sprintf(
                                        /* translators: %s: Name of current post */
                                        esc_html__( 'Edit %s', 'edumodo' ),
                                        the_title( '<span class="screen-reader-text">"', '"</span>', false )
                                    ),
                                    '<span class="edit-link">',
                                    '</span>'
                                );
                            ?>
                        </div>

                        <?php if($edumodo_learndash_course_style_1_social_share == 'on' ): ?>
                            <div class="pull-right">
                                <?php echo edumodo_social_share(); ?>
                            </div>
                        <?php endif;?>

                    </footer>
                </div>

            <?php endwhile; ?>
        </div> 
        <div class="col-md-4">
            <?php get_sidebar(); ?>
            <?php if($edumodo_learndash_course_style_1_related_course == 'on'): ?>
                <?php edumodo_learndash_related_courses( $post_id, $related_course_count ); ?>
            <?php endif; ?>
        </div>
    </div><!-- .row -->
</div><!-- .container -->


