kunai

Just another WordPress site

kunai

WordPress 自作テーマ kunai 配布

WordPress自作テーマ kunai comments.php

WordPress自作テーマ kunai

comments.phpのコード

カスタマイズを前提で、どうぞ。

<?php if ( post_password_required() ) { ?>

<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.'); ?></p>

<?php return; } ?>


<!-- You can start editing here. -->

<?php if ( have_comments() ) : ?>

	<h3 id="comments">
		<?php
			if ( 1 == get_comments_number() ) {
				/* translators: %s: post title */
				printf( __( 'One response to %s' ),  '&#8220;' . get_the_title() . '&#8221;' );
			} else {
				/* translators: 1: number of comments, 2: post title */
				printf( _n( '%1$s response to %2$s', '%1$s responses to %2$s', get_comments_number() ),
					number_format_i18n( get_comments_number() ),  '&#8220;' . get_the_title() . '&#8221;' );
			}
		?>
	</h3>


	<ol class="commentlist">
	<?php wp_list_comments();?>
	</ol>



<?php paginate_comments_links(); ?>



<?php endif; ?>



	<?php if ( comments_open() ) : ?>
		<!-- If comments are open, but there are no comments. -->

	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<p class="nocomments"><?php _e('Comments are closed.'); ?></p>

	<?php endif; ?>



<?php comment_form(); ?>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

kunai

WordPress 自作テーマ kunai 配布