Remove global post/page comments settings

This commit is contained in:
Alexander Agnarson 2018-09-14 17:46:44 +02:00
parent d964f15259
commit d0c639ccf0
4 changed files with 3 additions and 21 deletions

View file

@ -87,24 +87,6 @@ Kirki::add_field( 'typecore_theme', array(
's1-s2' => esc_html__( 'Hide both sidebars', 'typecore' ),
),
) );
// General: Post Comments
Kirki::add_field( 'typecore_theme', array(
'type' => 'switch',
'settings' => 'post-comments',
'label' => esc_html__( 'Post Comments', 'typecore' ),
'description' => esc_html__( 'Comments on posts', 'typecore' ),
'section' => 'general',
'default' => 'on',
) );
// General: Page Comments
Kirki::add_field( 'typecore_theme', array(
'type' => 'switch',
'settings' => 'page-comments',
'label' => esc_html__( 'Page Comments', 'typecore' ),
'description' => esc_html__( 'Comments on pages', 'typecore' ),
'section' => 'general',
'default' => 'off',
) );
// General: Recommended Plugins
Kirki::add_field( 'typecore_theme', array(
'type' => 'switch',

View file

@ -24,7 +24,7 @@ Template Name: Child Menu
</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; ?>

View file

@ -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; ?>

View file

@ -47,7 +47,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-->