Link to home
Start Free TrialLog in
Avatar of privateland
privatelandFlag for United States of America

asked on

How do I add comments on Wordpress?

Hello all,

I uploaded a free Wordpress theme on my server.  I also have Askimet and Get Recent Comments.  But the problem is when I uploaded my first post, there is no option for anyone to comment.  What did I forget to do?

http://www.clearlydizzy.com/clearlydizzy/wordpress/?p=47

Thanks in advance :)
~Amy
Avatar of Britt Thompson
Britt Thompson
Flag of United States of America image

Your page isn't completely rendering out...it's halting on your sidebar again.

You need your feedback section included in your index.php within your theme:

<div class="feedback"><?php wp_link_pages(); ?><?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></div>

this as well:

<div class="guests">
<?php comments_template(); // Get wp-comments.php template ?>
</div>
Avatar of privateland

ASKER

I still haven't worked on that part of it :(  I am not yet wanting it to hook up with Flickr so I'm needing to get rid of that.

Below I've included index.php.  I'm a little confused because I'm not sure where I should put it?

 
<?php get_header(); ?>
 
<div id="content">
 
	<div class="postgroup">
	
		<?php while (have_posts()) : the_post(); ?>
		<div class="post indexpost" id="post-<?php the_ID(); ?>">
			<?php
				$customfields = get_post_custom();
				$scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-siete/images/Alan.jpg?';
				if (empty($customfields['paddimage'][0])) {
					$imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-siete/images/thumbnail.png' . '&amp;w=132&amp;h=132&amp;zc=1';
				} else {
					$imgpath = $scrp;
				}
			?>
			<div class="title">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
						<?php the_title(); ?></a>
                </h2>
                <div class="postdate">
                    <span class="postdate-month">
							<?php the_time('M '); ?> 
					</span>
                    <span class="postdate-day">
							<?php the_time('d '); ?> 
					</span>
				</div>
            
				
			</div>
 
			<div class="entry">
               <div class="belowtitles">
                
                <?php
					$posttags = get_the_tags();
					if ($posttags) {
						
						?>  <? the_tags('<span class="section-1">', '</span><span class="section-1">', '</span>'); ?> 
						<?
					} ?>
					<span class="nodisplay">|</span>
                    <span class="section-3"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
				</div>
				  <img class="header" src="<?php echo $imgpath; ?>" alt="<?php the_title(); ?>" />
				<div class="text">
 
					<?php themefunction_content(340,'');?>
				</div>
                <div class="clearer"></div>
			</div>
            
		</div>
			
		<?php endwhile; ?>
				
 
	</div><!-- Postgroup ends here-->
		<div id="pagenav">
			<?php 
				if (function_exists('wp_pagenavi')) : 
					wp_pagenavi();  
				else : 
			?>
			<div class="simplenavi">
				<?php posts_nav_link(' &nbsp;&nbsp;','&laquo; Previous Entries','Next Entries &raquo;') ?></div>
			</div>
			<?php
				endif;
			?>
		</div> <!-- Pagenav ends here-->
</div><!-- Content wrapper ends here-->
 
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Open in new window

Okay, took out the Flickr :)

On the above code, should I take out Line 46 and add what you posted above?

Line 46:
<span class="section-3"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>

Open in new window

try changing this:

<span class="section-3"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>

to this:

<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

Also, here's my index.php for reference. You need to make sure that commenting is enabled. Typically, it will show that comments are disabled but I'm not sure with your template.
<?php
get_header();
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="info">
<div class="date"><h5><?php the_time('l, F jS, Y'); ?></h5></div>
<div class="meta"><?php _e("Filed under: "); ?><?php the_category(',') ?>&nbsp;&#8212;&nbsp;<?php the_tags(__('Tags: '), ', ', ' &#8212; '); ?><br /><br />
Last update: <?php the_author() ?>&nbsp;@&nbsp;<?php the_time() ?><br /><br />
<?php edit_post_link(__('Edit This')); ?></div><br />
<div class="footnotes"><?php the_meta(); ?></div>
</div>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="storycontent"><?php the_content(__('(more...)')); ?></div>
<div class="feedback"><?php wp_link_pages(); ?><?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></div>
</div>
<div style="clear:both;"></div>
<div class="guests">
<?php comments_template(); // Get wp-comments.php template ?>
</div>
<?php endwhile; else: ?>
 
<p>
<?php _e('Sorry, no posts matched your criteria.'); ?>
</p>
<?php endif; ?>
<?php posts_nav_link(' &#8212; ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
<div style="clear:both;"></div>
<?php get_footer(); ?>

Open in new window

Hmmm...I'm still not getting it.  I added that in there, and actually there was a slight change on the page, showing "Comments (0)", but still no place to add comments.  I do have a comments.php...I posted it below.  Perhaps there is something there I should change?
<div id="comments">
<div class="top"></div>
<div class="mid">
<div class="title">
<h2>Comments</h2>
<p><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</p>
</div>
<div class="details">
<?php if ( have_comments() ) : ?>
<div class="navigation">
<div class="prev"><?php previous_comments_link() ?></div>
<div class="next"><?php next_comments_link() ?></div>
</div>
<ol class="commentlist">
<?php wp_list_comments('callback=themefunction_comments'); ?>
</ol>
<div class="navigation">
<div class="prev"><?php previous_comments_link() ?></div>
<div class="next"><?php next_comments_link() ?></div>
</div>
<?php endif; ?>
</div>
</div>
<div class="bot"></div>
</div>
 
<div id="respond">
<div class="top"></div>
<div class="mid">
<div class="title">
<h2>Write a Comment</h2>
</div>
		
<div class="details">
<?php if ('open' == $post->comment_status) : ?>
<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">
<?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 class="input">
<span><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /></span>
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label>
</p>
<p class="input">
<span><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /></span>
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label>
</p>
<p class="input">
<span><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></span>
<label for="url"><small>Website</small></label>
</p>
<?php endif; ?>
<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
<p class="textarea"><span><textarea name="comment" id="comment" cols="85%" rows="10" tabindex="4"></textarea></span></p>
<p>
<button name="submit" type="submit" id="submit" tabindex="5">Submit Comment</button>
<?php comment_id_fields(); ?>
</p>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php else : ?>
<p class="nocomments">Comments are closed.</p>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>
</div>
<div class="bot"></div>
</div>

Open in new window

This has to be included in your index.php :

<?php comments_template(); // Get wp-comments.php template ?>

Okay, the following is the index.php code revised.
<?php get_header(); ?>
 
<div id="content">
 
	<div class="postgroup">
	
		<?php while (have_posts()) : the_post(); ?>
		<div class="post indexpost" id="post-<?php the_ID(); ?>">
			<?php
				$customfields = get_post_custom();
				$scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-siete/images/Alan.jpg?';
				if (empty($customfields['paddimage'][0])) {
					$imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-siete/images/thumbnail.png' . '&amp;w=132&amp;h=132&amp;zc=1';
				} else {
					$imgpath = $scrp;
				}
			?>
			<div class="title">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
						<?php the_title(); ?></a>
                </h2>
                <div class="postdate">
                    <span class="postdate-month">
							<?php the_time('M '); ?> 
					</span>
                    <span class="postdate-day">
							<?php the_time('d '); ?> 
					</span>
				</div>
            
				
			</div>
 
			<div class="entry">
               <div class="belowtitles">
                
                <?php
					$posttags = get_the_tags();
					if ($posttags) {
						
						?>  <? the_tags('<span class="section-1">', '</span><span class="section-1">', '</span>'); ?> 
						<?
					} ?>
					<span class="nodisplay">|</span>
                    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
				</div><div style="clear:both;"></div>
<div class="guests">
<?php comments_template(); // Get wp-comments.php template ?>
</div>
 
				  <img class="header" src="<?php echo $imgpath; ?>" alt="<?php the_title(); ?>" />
				<div class="text">
 
					<?php themefunction_content(340,'');?>
				</div>
                <div class="clearer"></div>
			</div>
            
		</div>
			
		<?php endwhile; ?>
				
 
	</div><!-- Postgroup ends here-->
		<div id="pagenav">
			<?php 
				if (function_exists('wp_pagenavi')) : 
					wp_pagenavi();  
				else : 
			?>
			<div class="simplenavi">
				<?php posts_nav_link(' &nbsp;&nbsp;','&laquo; Previous Entries','Next Entries &raquo;') ?></div>
			</div>
			<?php
				endif;
			?>
		</div> <!-- Pagenav ends here-->
</div><!-- Content wrapper ends here-->
 
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Open in new window

that looks right...publish it and see what you get.
Hmmm...still no comments :(  Should I be adding something withing page.php maybe?
put all this:

<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
                        </div><div style="clear:both;"></div>
<div class="guests">
<?php comments_template(); // Get wp-comments.php template ?>
</div>

after this:

<div class="clearer"></div>


and see what happens.
All that did was take the "Comments(0)" from the above the article to below the article :(  Not sure what to do now.
Maybe your template does actually require the page.php to contain the : <?php comments_template(); // Get wp-comments.php template ?>

give it a try...or post your page.php
Okay, I added that part to the page.php and this is what page.php now looks like...

<?php get_header(); ?>
 
<div id="content">
 
	<div class="postgroup">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	<div class="post singlepost" id="post-<?php the_ID(); ?>">
		<div class="title">
			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
			                <div class="postdate">
                    <span class="postdate-month">
							<?php the_time('M '); ?> 
					</span>
                    <span class="postdate-day">
							<?php the_time('d '); ?> 
					</span>
				</div>
			
		</div>
		<div class="entry">
        <?php
				$ad_468 = get_option('padd_ad_468');
				if (!empty($ad_468)) :
			?>
			<div class="singlegoogle">
				<?php echo stripslashes($ad_468); ?>
			</div>
			<?php endif; ?>
			<?php the_content('[More]'); ?>
			<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
		</div>
 
	</div>	
    <div class="clearer"></div>
<div class="guests">
<?php comments_template(); // Get wp-comments.php template ?>
</div>
<?php endwhile; else: ?>
 
    
    
    <div class="post singlepost">
		<div class="title">
			<h2>No Page Found</h2>
		</div>
		<div class="entry errorentry">
			<p>Sorry, but you are looking for a page that isn't here.</p>
		</div>
	</div>
<?php endif; ?>
	</div>
</div>
 
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Open in new window

Hello?  That didn't make it work.  Hmmm...any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Britt Thompson
Britt Thompson
Flag of United States of America 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
I pretty much am going to have to just go with another layout.  Thanks for your help though :)