mirror of
https://ghproxy.net/https://github.com/AlxMedia/typecore.git
synced 2025-08-26 07:52:44 +08:00
Remove global post/page comments settings
This commit is contained in:
parent
d964f15259
commit
d0c639ccf0
4 changed files with 3 additions and 21 deletions
|
@ -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',
|
||||
|
|
|
@ -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; ?>
|
||||
|
||||
|
|
2
page.php
2
page.php
|
@ -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; ?>
|
||||
|
||||
|
|
|
@ -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-->
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue