Created
December 5, 2018 20:04
-
-
Save Rayhanuc/e50448341f2973c024fadcc6837d106e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying all single posts | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
* | |
* @package Industry_Rayhan | |
*/ | |
get_header(); | |
?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div <?php if(has_post_thumbnail()) : ?> style="background-image: url(<?php echo esc_url(the_post_thumbnail_url('large')); ?>);" <?php endif; ?> class="industry-page-title-area"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<h2><?php the_title(); ?></h2> | |
<?php if (function_exists('bcn_display')) { bcn_display(); } ?> | |
<div class="entry-meta"> | |
<?php | |
industry_rayhan_posted_on(); | |
industry_rayhan_posted_by(); | |
?> | |
</div><!-- .entry-meta --> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="primary" class="content-area industry-content-area-padding"> | |
<main id="main" class="site-main"> | |
<div class="container"> | |
<div class="row"> | |
<?php if(get_post_type() == 'project' && is_active_sidebar( 'industry_project_sidebar' )) : ?> | |
<div class="col-md-4"> | |
<div class="project-widgets"> | |
<?php dynamic_sidebar( 'industry_project_sidebar' ); ?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<div class="<?php if(get_post_type() == 'project') : ?><?php if(is_active_sidebar( 'industry_project_sidebar' )) : ?>col-md-8<?php else : ?>col-md-10 col-md-offset-1<?php endif; ?><?php else : ?>col-md-8<?php endif; ?>"> | |
<?php | |
get_template_part( 'template-parts/content', get_post_type() ); | |
the_post_navigation(); | |
// If comments are open or we have at least one comment, load up the comment template. | |
if ( comments_open() || get_comments_number() ) : | |
comments_template(); | |
endif; | |
?> | |
</div><!-- col-md-8 end --> | |
<div class="col-md-4"> | |
<?php if(get_post_type() != 'project') { get_sidebar(); } ?><!-- sidebar --> | |
</div> | |
</div> | |
</div> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php endwhile; // End of the loop. ?> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment