Skip to content

Commit

Permalink
Page/post comments options removed as it is already in core
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxMedia committed Jul 20, 2018
1 parent ba56216 commit b0c90ca
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
18 changes: 0 additions & 18 deletions functions/theme-options.php
Expand Up @@ -99,24 +99,6 @@
'section' => 'general',
'default' => 'on',
) );
// General: Post Comments
Kirki::add_field( 'slanted_theme', array(
'type' => 'switch',
'settings' => 'post-comments',
'label' => esc_attr__( 'Post Comments', 'slanted' ),
'description' => esc_attr__( 'Comments on posts', 'slanted' ),
'section' => 'general',
'default' => 'on',
) );
// General: Page Comments
Kirki::add_field( 'slanted_theme', array(
'type' => 'switch',
'settings' => 'page-comments',
'label' => esc_attr__( 'Page Comments', 'slanted' ),
'description' => esc_attr__( 'Comments on pages', 'slanted' ),
'section' => 'general',
'default' => 'off',
) );
// General: Recommended Plugins
Kirki::add_field( 'slanted_theme', array(
'type' => 'switch',
Expand Down
2 changes: 1 addition & 1 deletion page-templates/child-menu.php
Expand Up @@ -19,7 +19,7 @@

</article>

<?php if ( get_theme_mod( 'page-comments', 'off' ) == 'on' ) { comments_template('/comments.php',true); } ?>
<?php if ( comments_open() || get_comments_number() ) : comments_template( '/comments.php', true ); endif; ?>

<?php endwhile; ?>

Expand Down
2 changes: 1 addition & 1 deletion page.php
Expand Up @@ -14,7 +14,7 @@

</article>

<?php if ( get_theme_mod( 'page-comments', 'off' ) == 'on' ) { comments_template('/comments.php',true); } ?>
<?php if ( comments_open() || get_comments_number() ) : comments_template( '/comments.php', true ); endif; ?>

<?php endwhile; ?>

Expand Down
2 changes: 1 addition & 1 deletion single.php
Expand Up @@ -42,7 +42,7 @@

<?php if ( get_theme_mod( 'related-posts', 'categories' ) != 'disable' ) { get_template_part('inc/related-posts'); } ?>

<?php if ( get_theme_mod( 'post-comments', 'on' ) == 'on' ) { comments_template('/comments.php',true); } ?>
<?php if ( comments_open() || get_comments_number() ) : comments_template( '/comments.php', true ); endif; ?>

</div><!--/.pad-->
</div><!--/.content-->
Expand Down

0 comments on commit b0c90ca

Please sign in to comment.