[WordPress] Menampilkan komentar di postingan tetapi tidak terlihat di home

rweb

 

 

<?php get_header() ?>

<div class=”site-content container”>
<section class=”sidebar col-md-3″>
<?php get_sidebar() ?>
</section>

<section class=”content col-md-9″>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article class=”row post post-<?php the_ID() ?>”>
<header class=”entry-header”>
<h1 class=”entry-title”><a href=”<?php the_permalink() ?>”><?php the_title() ?></a></h1>
<div class=”entry-meta”>
<span class=”entry-date”>
<a href=”” rel=”bookmark”><span class=”glyphicon glyphicon-calendar”></span> <time class=”entry-date” datetime=”<?php echo get_the_date(‘c’) ?>T14:53:43+00:00″><?php echo get_the_date() ?></time></a>&nbsp;
</span>
<span class=”byline”>
<span class=”author vcard”><a class=”url fn n” href=”” rel=”author”><span class=”glyphicon glyphicon-user”></span> <?php the_author() ?></a></span>&nbsp;
</span>
<span class=”comments-link”>
<a href=” ” title=”Comment on oke”><span class=”glyphicon glyphicon-comment”></span> Leave a Comment</a>&nbsp;
</span>
<span class=”edit-link”>
<a class=”post-edit-link” href=”#”><span class=”glyphicon glyphicon-edit”></span> Edit Post</a>
</span>
</div>
</header>

<div class=”entry-content”>
<?php if ( is_home() ) the_excerpt(); else the_content(); ?>
</div>
<footer class=”entry-footer”>
<?php if ( is_home() ) : ?><span class=”entry-more”><a href=”<?php the_permalink() ?>” class=”btn btn-primary”>READ MORE <span class=”glyphicon glyphicon-chevron-right”></span></a></span><?php endif; ?>
</footer>
</article>
<?php endwhile; endif; ?>
<nav class=”row pagination nav-post”>
<ul>
<li class=”pull-left”><?php if ( is_home() ) previous_posts_link(); else previous_post_link(); ?></li>
<li class=”pull-right”><?php if ( is_home() ) next_posts_link(); else next_post_link(); ?></li>
</ul>
</nav>

<div class=”comment-area”>
<?php if ( is_home() ) the_excerpt(); else wp_list_comments($args, $comments=get_comments(array(‘post_id’ =>$id ))); ?>
<?php comment_form( $args, $post_id ); ?>

</div>
</section>
</div>

<?php get_footer() ?>

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s