Viewing 9 replies - 1 through 9 (of 9 total)
  • Open index.php and look for <?php comments_template(); ?>. If it’s not there, you need to add it – probably just before the <?php endwhile; ?> line.

    Thread Starter phoenixdoula

    (@phoenixdoula)

    Hmmm…I tried that but no luck:

    Here is the index and comments code:
    index:

    <?php get_header(); ?>
    
    	<div id="content" class="col span-8">
    		<div class="col last span-6 nudge-2">
    			<h4 class="ver small">Latest Entries</h4>
    		</div>
    
    		<?php if (have_posts()) : ?>
    			<?php while (have_posts()) : the_post(); ?>
    				<div class="post">
    					<div class="post-meta col span-2">
    						<ul class="nav">
    							<li><?php the_time('F j, Y'); ?></li>
    							<li>In <?php the_category(', '); ?></li>
    							<li><?php comments_number('No comments yet','One comment','% comments'); ?></li>
    							<?php edit_post_link('Edit this post', '<li>', '</li>'); ?>
    						</ul>
    					</div>
    
    					<div class="post-content span-8 nudge-2">
    						<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    						<?php the_content('Continue reading...'); ?>
    
    					</div>
    				</div>
    
    			<?php endwhile; ?>
    
    			<ul class="navigation">
    				<li class="left"><?php next_posts_link('&larr; Older Entries') ?></li>
    				<li class="right"><?php previous_posts_link('Newer Entries &rarr;') ?></li>
    			</ul>
    
    		<?php else : ?>
    
    			<h3>Not Found</h3>
    			<p>Sorry, but you are looking for something that isn't here.</p>
    
    		<?php endif; ?>
    	</div>	
    
    	<hr />
    
    	<?php get_sidebar(); ?>
    
    	<?php get_footer(); ?>

    comments.php

    <?php // Do not delete these lines
    	if (!empty($_SERVER['SCRIPT_FILENAME']) &amp;&amp; '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) : ?>
    <div id="commentary" class="col span-8">
    	<div class="col last span-6 nudge-2">
    		<h4 class="ver small">Comments for this entry</h4>
    	</div>
    </div>
    
    	<?php foreach ($comments as $comment) : ?>
    		<div class="comment">
    			<div class="col span-2 align-right">
    				<dl>
    					<dt><strong><?php comment_author_link() ?></strong></dt>
    					<dd><?php if(function_exists('get_avatar')) { echo get_avatar($comment, '64'); } ?></dd>
    				</dl>
    			</div>
    
    			<div class="col last span-6">
    				<?php comment_text() ?>
    			</div>
    		</div>
    
    	<?php endforeach; /* end for each comment */ ?>
    
     <?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. -->
    		<div id="leave-comment">
    			<div class="col last span-6 nudge-2">
    				<h4 class="ver small">Comments are closed</h4>
    			</div>
    		</div>
    	<?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <div id="leave-comment" class="col span-8">
    	<div class="col last span-6 nudge-2">
    		<h4 class="ver small">Leave your comment</h4>
    		<p>Please be polite. You can use these <acronym title="HyperText Markup Language">HTML</acronym> tags: <code>STRONG</code>, <code>A</code>, <code>BLOCKQUOTE</code>, <code>CODE</code></p>
    	</div>
    
    	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    	<div class="comment-field">
    		<div class="post-meta col span-2 align-right">
    			<label for="author">Name</label>
    		</div>
    
    		<div class="col span-4">
    			<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" />
    		</div>
    
    		<div class="post-meta col last span-2">
    			<p><small class="tooltip">Required.</small></p>
    		</div>
    	</div>
    
    	<div class="comment-field">
    		<div class="post-meta col span-2 align-right">
    			<label for="email">E-mail</label>
    		</div>
    
    		<div class="col span-4">
    			<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" />
    		</div>
    
    		<div class="post-meta col last span-2">
    			<p><small class="tooltip">Required. Won't be published.</small></p>
    		</div>
    	</div>
    
    	<div class="comment-field">
    		<div class="post-meta col span-2 align-right">
    			<label for="url">Website</label>
    		</div>
    
    		<div class="col span-4">
    			<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="3" />
    		</div>
    	</div>
    
    	<div class="comment-field">
    		<div class="post-meta col span-2 align-right">
    			<label for="comment">Comment</label>
    		</div>
    
    		<div class="col last span-6">
    			<textarea name="comment" id="comment" tabindex="4" cols="10" rows="10"></textarea>
    		</div>
    	</div>
    
    	<div class="comment-field col last-field span-2 nudge-2">
    		<input name="submit" type="image" id="submit" tabindex="5" value="Submit" class="submit" src="<?php bloginfo('template_directory'); ?>/images/button-post-comment.gif" />
    	</div>
    
    	<p><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
    
    	<?php do_action('comment_form', $post->ID); ?>
    
    	</form>
    </div>
    
    <?php endif; // if you delete this the sky will fall on your head ?>

    Thread Starter phoenixdoula

    (@phoenixdoula)

    Oh, and thanks so much – I really appreciate any help anyone can provide.
    Jeanette

    Thread Starter phoenixdoula

    (@phoenixdoula)

    Found the solution – where would I be without google!

    Could you post a link to the solution or the solution itself? I’ve been googling all day and I can’t find anything other than this post

    I spoke to soon. I figured it out – in case anyone else comes back looking for the solution – in index.php at line 16 I replaced

    • <?php comments_number(‘No comments yet’,’One comment’,’% comments’); ?>
    • with this:

    • <?php comments_popup_link(‘No comments’, ‘One comment’, ‘% comments’, ‘comments-link’, ‘Comments are closed’); ?>
    • and that did the trick.

    diptych,
    Thank you. You saved me a lot of time.
    I wonder why that happened anyway, my suspicion is that it happend when I did the auto-upgrade.
    .ore

    eselcee

    (@eselcee)

    Thank you so much diptych —
    I was practically pulling my hair out over this issue. You saved me a lot of time as well!

    i wasn’t able to restore comments.
    I have been tinkering around with the CSS so much that I have no idea as where I might have lost it…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘modern clix theme – link to comments not showing on main page’ is closed to new replies.