2012-01-22 2 views
0

내 단일 게시물 페이지에 내 의견 섹션에 대한 해결책이 없어졌습니다. 이 페이지에서 게시물 및 태그 섹션 아래의 코드가 표시되지 않는 것으로 나타났습니다. 누군가 나를 위해 관리자의 코드를 볼 의향이 있습니까? 사이트가 잘 구성되어 있기 때문에 식별하기가 쉽다는 것이 상상됩니다.Wordpress 댓글 섹션이 표시되지 않음

이것이 문제를 해결할 수있는 유일한 방법입니다.

업데이트 업데이트 업데이트. 여기에 여기에 comments.php 페이지입니다, 또한 Single.php

<?php get_header(); ?> 

    <?php include ('page_header.php'); ?> 
    <?php include ('page_navigation.php'); ?>  


    <div id="page-content" class="clearfix"> 

     <div id="content-container" class="clearfix"> 

      <div id="main-content"> 

       <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 

        <?php if (get_option('minimax_post_layout') == 'head-three') { ?> 

         <h2><?php the_title(); ?><em>Posted on <?php the_time('D, M d, Y') ?></em></h2>  
         <?php if (has_post_thumbnail()) { ?> 
         <div class="post-item-thumb-<?php echo get_option('minimax_post_layout'); ?>"> 
         <?php the_post_thumbnail('thumb_post_3'); ?> 
         </div> 
         <?php } ?>                         

        <?php } else { ?> 

         <?php if (has_post_thumbnail()) { ?> 
         <div class="post-item-thumb-<?php echo get_option('minimax_post_layout'); ?>"> 
         <?php the_post_thumbnail('thumb_post_2'); ?> 
         </div> 
         <?php } ?>                  
         <h2><?php the_title(); ?><em>Posted on <?php the_time('D, M d, Y') ?></em></h2>  

        <?php } ?>                

        <?php the_content(); ?> 

        <?php edit_post_link('Edit', '<br /><p>', '</p>'); ?> 

        <?php include ('post_related.php'); ?> 

        <div id="post-indexing"> <?php the_tags('<strong>Tagged as</strong> ',', ','+'); ?><br /><strong>Categorized as</strong> <?php the_category(', ','single'); ?></div>     

        <?php include ('post_author.php'); ?> 


        <?php comments_template(); ?>    

       <?php endwhile; else: ?> 
        <p><?php _e('Sorry, no pages matched your criteria.'); ?></p> 
       <?php endif; ?> 

      </div><!-- end main-content --> 

      <?php include ('sidebar_post.php'); ?> 

     </div><!-- end content-container --> 


     <?php include ('footer_columns_posts.php'); ?> 


    </div><!-- end page-content --> 

<?php get_footer(); ?>  

있어 :

여기
<div id="comments"> 
<?php // Do not delete these lines 
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) 
    die ('Please do not load this page directly. Thanks!'); 

if (!empty($post->post_password)) { // if there's a password 
    if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie 
     ?> 

     <p class="nocomments">This post is password protected. Enter the password to view comments.</p> 

     <?php 
     return; 
    } 
} 

/* This variable is for alternating comment background */ 
$oddcomment = 'class="alt" '; 
?> 

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



<?php if ($comments) : ?> 

<h2>Comments <span>(<?php comments_number('No Responses', 'One Response', '% Responses');? 

>)</span></h2> 

<ul class="commentlist"> 
    <?php wp_list_comments('avatar_size=60&type=comment'); ?> 
</ul>  

<?php else : // this is displayed if there are no comments so far ?> 

<?php if ('open' == $post->comment_status) : ?> 
    <!-- If comments are open, but there are no comments. --> 

<?php else : // comments are closed ?> 
    <!-- If comments are closed. --> 

<?php endif; ?> 
<?php endif; ?> 


<?php if ('open' == $post->comment_status) : ?> 

<div id="respond"> 

<h3><?php comment_form_title('Leave a Reply', 'Leave a Reply to %s'); ?></h3> 
<div class="cancel-comment-reply"> 
<?php cancel_comment_reply_link(); ?> 
</div> 

<?php if (get_option('comment_registration') && !$user_ID) : ?> 
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo 
urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p> 
<?php else : ?> 


<div id="post-comment" class="clearfix"> 

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" 
id="commentform"> 
<fieldset> 
<?php if ($user_ID) : ?> 

<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo 
$user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php? 
action=logout" title="Log out of this account">Log out &raquo;</a></p> 

<?php else : ?> 


<label for="author"><?php if ($req) echo "* "; ?>Your name:</label> 
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" 
tabindex="1" /> 

<label for="email"><?php if ($req) echo "* "; ?>Mail (will not be published):</label> 
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" 
size="22" tabindex="2" /> 

<label for="url">Website</label> 
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" 
tabindex="3" /> 


<?php endif; ?> 

<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ? 
></code></small></p>--> 

<label for="comment" class="comment">Your comment:</label> 
<textarea name="comment" id="comment" class="comment" cols="61%" rows="10" 
tabindex="4"></textarea> 

<input name="submit" type="submit" class="submit" alt="Submit Comment" id="submit" tabindex="5" 
value="Submit Comment" /> 
<input type="hidden" class="hide" name="comment_post_ID" value="<?php echo $id; ?>" /> 

<?php comment_id_fields(); ?> 
<?php do_action('comment_form', $post->ID); ?> 
</fieldset> 
</form> 
</div><!-- end post-comment --> 
</div> 
<?php endif; // If registration required and not logged in ?> 


<?php endif; // if you delete this the sky will fall on your head ?> 
</div> 

는 워드 프레스에 the_author_image() 등의 모든 기능이 없다

<?php if (get_option('minimax_author') == 'yes') { ?> 
<div id="author-desc" class="clearfix"> 
<?php the_author_image(); ?> 
<h4>About the Author</h4> 
<?php the_author_description(); ?> 
</div> 
<?php } ?> 
+0

단일 포스트 페이지가 single.php, 또한 –

+0

이 comments.php한다 댓글은 사이드 바 최근 댓글 아래에 표시되지 않으며 블로그 페이지로 바로 이동 한 다음 '계속 진행'을 클릭합니다. 단일 게시물 페이지를 표시하는 "ding"페이지 –

+2

이렇게 자격 증명을 게시하는 것이 좋습니다. 누군가 그것을 나쁘게 사용할 수 있습니다. – Paker

답변

1

post_author.php입니다. 그래서, 당신은 당신의 post_author.php에서

<?php the_author_image(); ?>

줄을 제거해야합니다. 작성자 이미지를 표시하려면 Wordpress에서 Gravatar의 아바타를 얻으십시오. get_avatar()을 사용하여 작성자의 Gravatar를 표시 할 수 있습니다. 곧에서

echo get_avatar(get_the_author_id()); 

, 이것을 사용 :

<?php echo get_avatar(get_the_author_id()); ?> 

을 대신의 :

<?php the_author_image(); ?>

+1

도와 주셔서 감사합니다. –

관련 문제