Forums

Comment Form Doens't Shows Up On Pages..Only shows up on Posts (3 posts)

  1. noteeboyz
    Member
    Posted 2 years ago #

    I have a strange problem...I have enabled allowing comments on pages and posts but the comment form doesn't appears on pages like:

    http://www.smartbloggerz.com/advertise/
    http://www.smartbloggerz.com/contact/

    It appears on posts...I have properly checked that I have enable Allowing Comment, Pings and Trackbacks on Pages but still it doens't shows up.

    Here is my comment.php file if anyone could figure out the problem:

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    // 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 ( post_password_required() ) { ?>
    		<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
    	<?php
    		return;
    	}
    ?>
    
    <!-- You can start editing here. -->
    <!--INFOLINKS_OFF-->
    <div id="comments">
    <?php if ( !empty($comments_by_type['pings']) ) :  ?>
    	<?php endif; ?>
    
    	<?php if ( have_comments() ) : ?>
    	<h4 class="thecomments">Don't be shy ;) Share your thoughts on this article by commenting below. Remember that this is a <a href="http://www.smartbloggerz.com/2009/04/more-fun-and-benefits-while-commenting-on-smartbloggerz" title="Changes in the Commenting Feature">do-follow blog</a> with many more exciting features!<br />
    <br />
    <?php comments_number('No Comments', '1 Comment', '% Comments' );?> <a href="#addcom">Add yours</a></h4>
    
    	<ol class="commentlist">
    	<?php wp_list_comments('type=comment&avatar_size=48&callback=ubt_comment'); ?>
    	</ol>
    
    	<?php $total_pages = get_comment_pages_count();
    	if ( $total_pages > 1 ) {?>
    	<div class="navigation">
    		<div class="alignleft"><?php previous_comments_link() ?></div>
    		<div class="alignright"><?php next_comments_link() ?></div>
    	</div><?php } ?>
    
     <?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. -->
    		<p class="nocomments">Comments are closed.</p>
    	<?php endif; ?>
    <?php endif; ?>
    </div>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <div id="respond">
    
    <div class="cancel-comment-reply">
    	<small><?php cancel_comment_reply_link(); ?></small>
    </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 : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <div style="float:left">
    <h4 class="addac"><a name="addcom">Add a comment</a></h4>
    <?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 wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
    
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small>E-Mail ID <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>Website</small></label></p>
    
    <p><input type="text" name="atf_twitter_id" id="atf_twitter_id" value="<?php echo $comment_twitter_url; ?>" size="22" tabindex="4" />
    <label for="atf_twitter_id"><small>Twitter Username(No "http://" or "@")</small></label></p>
    
    <p class="fstyle"><input name="subject" type="text" value=""/>  </p> 
    
    <p><b>Don't Forget To Read Our <a href="http://www.smartbloggerz.com/comment-policy/" title="_blank">Comment Policy</a></b></p>
    
    <?php endif; ?>
    </div>
    
    <ul style="float:right"><li>Avatars are handled by <a href="http://en.gravatar.com" ><span style="text-decoration:underline">Gravatar</span></a></li>
    <?php if (get_option('comment_moderation') == 1) : ?>
    <li>Comments are being moderated</li>
    <?php elseif(get_option('comment_whitelist') == 1) : ?>
    <li>Comments are being moderated</li>
    <?php endif; ?>
    </ul>
    
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
    
    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    </div>
    
    <?php endif; // If registration required and not logged in ?>
    
    <?php endif; // if you delete this the sky will fall on your head ?>

    Help will be appreciated ;)

  2. gerbilk
    Member
    Posted 2 years ago #

    have you checked your page.php?

  3. linli
    Member
    Posted 2 years ago #

    jhtfhgdgdg

Topic Closed

This topic has been closed to new replies.

About this Topic