Link to home
Start Free TrialLog in
Avatar of Kevin
KevinFlag for United States of America

asked on

Wordpress comments are there - but cannot see them or add comments

My blog www.lafayettekiwanis.org/blog has comments on some posts that were created before I moved to my current theme.  On the individual posts, it will say "1 comment" etc, but comments are not visible.

Also if you want to add a comment by clicking on "no comments" nothing happens.

My PHP code for single.php (I think that would be the correct file) is:

	<?php get_header(); ?>
   
    <!--WELCOME AREA-->
    <div class="container">
        <div class="row">
            <div class="span12">
            <div class="welcome">
<h1 class="colored"><?php the_title(); ?></h1></div>
<div class="divider"></div>
            </div>
        </div>
    </div>
    <!--/WELCOME AREA-->
    
    <!--PAGE CONTENT-->
    <div class="container" style="margin-bottom:50px;">
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<div class="row">
        	<div class="span8">
            	<div class="row">
                 <?php
      if (have_posts()) : while (have_posts()) : the_post();
   ?>
                    <div class="span8 blog_post">
                    	<div class="row">
                        	<div class="span8">
                            <div class="view view-first">
                                                                                  <?php 
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); 
if ($image) : ?>
    <img src="<?php echo $image[0]; ?>" alt="" />
<?php endif; ?> 
                                	</div>
                                </div>
                   
                        	</div>
                        </div>
                        <div class="span8">
                    	<div class="row">
                            <div class="span2">
                                <h3 style="font-weight:300;text-align:right"><?php the_time('F j, Y') ?> </h3><hr>
                               <div class="meta  hidden-phone">
                                    <span><?php the_category(' '); ?> <i class="icon-list-alt"></i></span>
                                    <span><?php _e('', 'themeText'); ?> <?php the_author(); ?> <i class="icon-user"></i></span>
                                    <span> <?php comments_popup_link(__('No Comments', 'themeText'), __('1 Comment', 'themeText'), __( '% Comments', 'themeText') ); ?> <i class="icon-comment"></i></span>
                                    <hr>

                                </div>
                            </div>
                            <div class="span6">
                                 
                                <?php the_content(); ?>
                              <p style="color:#65686A;font-style:italic;">Tagged with: <?php the_tags(' ',' • ','<br />'); ?></p>

                            </div>
                        </div>
                 
                    
   <!-- Commment template was in this spot --> 
   
  <?php endwhile; endif;?>
                    
                </div>
            </div></div>
            
            <div class="span4 sidebar hidden-phone">
            
<?php get_sidebar(); ?>        
                
            </div>
            
        </div></div>
    </div>
    <!--PAGE CONTENT-->
    <?php get_footer(); ?>

Open in new window


I would like the existing comments to appear by default, as well as the comment area for new comments.  How would I do that with this theme's file?
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

There doesn't appear to be a call to show comments in that code above.  Is this a theme that's available for download?
Avatar of Kevin

ASKER

I purchased it, but can send or show code of any files that you would need to see...  What's the best way to do that?
Does the theme have a comments.php file?
Avatar of Kevin

ASKER

Yep...

<?php

	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if ( post_password_required() ) { ?>
		This post is password protected. Enter the password to view comments.
	<?php
		return;
	}
?>

<?php if ( have_comments() ) : ?>
	<a name="comments"></a>
	<h6 class="sep_bg colored comments-title"><?php comments_number(__(' No Comments', 'themeText'), __(' 1 Comment', 'themeText'), __( ' % Comments', 'themeText') )?></h6>

	<ol class="commentlist">
		<?php wp_list_comments( array( 'callback' => 'theme_comments' ) ); ?>
	</ol>

    <div class="navigation group">
        <div class="prev-posts align"><?php previous_comments_link('&larr;'); ?></div>
        <div class="next-posts oppalign"><?php next_comments_link('&rarr;'); ?></div>
	</div>
	
 <?php else : // this is displayed if there are no comments so far ?>

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

	 <?php else : // comments are closed ?>
		<p>Comments are closed.</p>

	<?php endif; ?>
	
<?php endif; ?>                     
                        
 <?php if ('open' == $post->comment_status) : ?>                       
                   <div id="respond" class="respond row">

	<div class="span8">     
                  <h3 class="sep_bg"><?php echo __( 'Leave a Comment', 'themeText' ); ?></h3>
		<p><?php echo __( 'Please keep in mind that comments are moderated and <code>rel="nofollow"</code> is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.', 'themeText' ); ?></p>
	</div>
    	<div class="span8">
 
		<div class="cancel-comment-reply">
			<small><?php cancel_comment_reply_link(); ?></small>
		</div>
        		<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
			<p><?php echo __( 'You must be', 'themeText' ); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php echo __( 'logged in', 'responsy' ); ?></a> <?php echo __( 'to post a comment.', 'themeText' ); ?></p>
		<?php else : ?>
                                <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" class="form">
                                	<?php if ( $user_ID ) : ?>
		 
			<p><?php echo __( 'Logged in as', 'themeText' ); ?> <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"><?php echo __( 'Log out &raquo;', 'themeText' ); ?></a></p>
		 
			<?php else : ?>														
       <!--[if IE]><label for="name"><?php _e('Name:', 'themeText'); ?></label><![endif]--><input style="margin-right:25px;" name="author" class="span2" type="text" placeholder="<?php _e('Name:', 'themeText'); ?>" value="<?php echo $comment_author; ?>" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
       
       <!--[if IE]><label for="name"><?php _e('Email:', 'themeText'); ?></label><![endif]--><input name="email" type="text" class="span2" style="margin-right:25px;" placeholder="<?php _e( 'Email', 'themeText' ); ?>" value="<?php echo $comment_author_email; ?>" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
        
        <!--[if IE]><label for="name"><?php _e('your website (optional):', 'themeText'); ?></label><![endif]--><input name="url" type="text" class="span2"  placeholder="<?php _e( 'your website (optional)', 'themeText' ); ?>" value="<?php echo $comment_author_url; ?>" tabindex="3" />
        <?php endif; ?>
       
       <!--[if IE]><label for="name"><?php _e('Your Comment:', 'themeText'); ?></label><![endif]--><textarea name="comment" type="text" placeholder="<?php _e( 'Your Comment...', 'themeText' ); ?>" rows="5" class="span8" tabindex="4" <?php if ($req) echo "aria-required='true'"; ?>></textarea>
       
       <input name="submit" type="submit" value="<?php _e( 'Send Comment', 'themeText' ); ?>"  class="btn btn-small btn-info"><?php comment_id_fields(); ?>
                               
                               <?php do_action('comment_form', $post->ID); ?>
                                </form>
<?php endif; // If registration required and not logged in ?>
</div>
</div>
<?php endif; // if you delete this the sky will fall on your head ?>

Open in new window

Avatar of eduardo_marquez
eduardo_marquez

Hello,

Do your Mojo-Themes theme has a custom control panel? If you didn't modify your source files, your site should be displaying your comments like the More+ demo:

http://more.wpelement.com/?p=190#comments

Could you please check if in your WordPress admin you can find a Mojo Themes' control panel with a switch to turn on and off comments on posts/pages? Most do have them.
Avatar of Kevin

ASKER

This theme does have a control panel with many options, but none that refer to comments :(

The only blog options are to choose between "classic" and "paging" - neither mode will show the comments...
ASKER CERTIFIED SOLUTION
Avatar of James Rodgers
James Rodgers
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kevin

ASKER

What would the code look like to include the file comments.php at that spot ?
Avatar of Kevin

ASKER

I added

include 'comments.php';

to the single.php file, which works great to allow someone to comment, but i still cannot see any of the the existing comments below the post...
Avatar of Kevin

ASKER

Found the wp Code to add back into the file & now it works - thanks.
can you post the comment.php file
also, check that comments are turned on in your theme
ok.

glad i could help