Solved

How do I add comments on Wordpress?

Posted on 2009-07-14
18
496 Views
Last Modified: 2013-11-19
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
0
Comment
Question by:privateland
  • 9
  • 7
18 Comments
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
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>
0
 

Author Comment

by:privateland
Comment Utility
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

0
 

Author Comment

by:privateland
Comment Utility
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

0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
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

0
 

Author Comment

by:privateland
Comment Utility
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

0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
This has to be included in your index.php :

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

0
 

Author Comment

by:privateland
Comment Utility
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

0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
that looks right...publish it and see what you get.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:privateland
Comment Utility
Hmmm...still no comments :(  Should I be adding something withing page.php maybe?
0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
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.
0
 

Author Comment

by:privateland
Comment Utility
All that did was take the "Comments(0)" from the above the article to below the article :(  Not sure what to do now.
0
 
LVL 30

Expert Comment

by:renazonse
Comment Utility
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
0
 

Author Comment

by:privateland
Comment Utility
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

0
 

Author Comment

by:privateland
Comment Utility
Hello?  That didn't make it work.  Hmmm...any ideas?
0
 
LVL 30

Accepted Solution

by:
renazonse earned 500 total points
Comment Utility
If you switch templates temporarily does the comment section appear?
0
 

Author Comment

by:privateland
Comment Utility
I pretty much am going to have to just go with another layout.  Thanks for your help though :)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now