Skip to content

Commit c221e73

Browse files
Merge pull request #117 from OpenSourceOrg/fix/discourse-comment-template
Move comment section
2 parents a77b87a + 82bfa48 commit c221e73

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

themes/osi/single.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@
1919
} else {
2020
get_template_part( 'template-parts/breadcrumbs' );
2121
}
22-
22+
2323
while ( have_posts() ) :
2424
the_post();
25-
2625
get_template_part( 'template-parts/content', get_post_type() );
27-
28-
//If comments are open or we have at least one comment, load up the comment template.
29-
if ( 'board-member' === get_post_type() || 'post' === get_post_type() ) :
30-
if ( comments_open() || get_comments_number() ) :
31-
comments_template();
32-
endif;
33-
endif;
34-
3526
endwhile; // End of the loop.
3627
?>
3728
</section>

themes/osi/template-parts/content.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939

4040
<?php the_content(); ?>
4141
</div><!-- .entry-content -->
42+
<?php
43+
//If comments are open or we have at least one comment, load up the comment template.
44+
if ( 'board-member' === get_post_type() || 'post' === get_post_type() ) :
45+
if ( comments_open() || get_comments_number() ) :
46+
comments_template();
47+
endif;
48+
endif;
49+
?>
4250
<section id="pre-footer">
4351
<?php get_template_part( 'template-parts/nav-postname-pager' ); ?>
4452
</section>

0 commit comments

Comments
 (0)