Hi,
My comments are not showing on my website http://www.virgogems.com. Also, new comments appear under every post instead of just the correct post. I contacted the theme's support, but they have not responded. I have been trying to fix these errors for a couple months now. I changed the theme and the comments worked. I deactivated all of the plugins, but that did not work. Besides, I need those plugins. I deleted the html for facebook commenting in the single.php file and that didn't work. Now, the theme just has the wordpress commenting system and the problems are still there. I also checked the 'discussion' settings several times. I am out of options. I am willing to use a new comment system if that will work. I will post the original single.php coding, the 404 template coding, and the comments.php coding. Please help. This theme has been a headache to use, but I really like it.
Single.php
<?php get_header(); ?>
<div id="bottom">
<div class="single_page" id="front-list">
<div class="single_page_inner">
<!-- "Breadcrumb Code" Start "Avoid to edit" -->
<div class="breadcrumb"> <a href="<?php bloginfo('url'); ?>">Home</a> »
<?php the_category(' // ') ?>
»
<?php the_title(); ?>
</div>
<!-- "Breadcrumb Code" End -->
<div class="post">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>"> <a href="<?php echo get_permalink($_post->ID); ?>">
<h1>
<?php the_title(); ?>
</h1>
</a>
<div class="post-meta"> <span style="float:left;">
<!-- AddThis Button BEGIN -->
<div class="ShareBlock">
<div style="padding-top:1px; float:left; margin-left:4px;">
<g:plusone size="medium"></g:plusone>
<script type="text/javascript">gapi.plusone.go();</script>
</div>
<div style="padding-top:1px; float:left; margin:0 2px;">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="=<?php echo urlencode(get_permalink($post->ID)); ?>" send="true" layout="button_count" width="40" show_faces="false" font=""></fb:like>
</div>
<div style="padding-top:2px; float:left;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="ayushveda">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<div style="padding-top:2px; float:left;">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=2"></script>
</div>
<!--ShareBlock-->
</div>
<!-- AddThis Button END -->
</span> <span style="float:right;">
<?php comments_popup_link('No Comment', 'One Comment', '% Comments');?>
</span> </div>
<div class="content-bottom-ads"> <?php echo stripslashes(stripslashes(get_option('themeflicks_ads_top')))?> </div>
<!-- "Content" Start -->
<?php the_content(' '); ?>
<!-- "Content" End -->
<!-- "Content Top Ads" Start "Avoid to edit" -->
<div class="content-bottom-ads"> <?php echo stripslashes(stripslashes(get_option('themeflicks_ads_bottom')))?> </div>
<!-- "Content Bottom Ads" End -->
<!-- "Bottom Tags" Start -->
<div class="bottom-tag">
<div class="fl">Tags</div>
<div class="fr">
<?php the_tags('<span class="tags">', ', ', '</span>'); ?>
</div>
</div>
<!-- "Bottom Tags" End -->
<div class="singal-page-bottom">
<!-- Social Sharing Icons -->
<div class="post-meta"> <span style="float:left;">
<!-- AddThis Button BEGIN -->
<div class="ShareBlock">
<div style="padding-top:1px; float:left; margin-left:4px;">
<g:plusone size="medium"></g:plusone>
<script type="text/javascript">gapi.plusone.go();</script>
</div>
<div style="padding-top:1px; float:left; margin:0 2px;">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="=<?php echo urlencode(get_permalink($post->ID)); ?>" send="true" layout="button_count" width="40" show_faces="false" font=""></fb:like>
</div>
<div style="padding-top:2px; float:left;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="ayushveda">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<div style="padding-top:2px; float:left;">
<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script>
<script type="in/share" data-counter="right"></script>
</div>
<!--ShareBlock-->
</div>
<!-- AddThis Button END -->
</span> <span style="float:right;">
<?php comments_popup_link('No Comment', 'One Comment', '% Comments');?>
</span> </div>
<!-- end Social Sharing Icons -->
<!-- "Related Posts Code" Start -->
<div class="related-title"><span>Hey, There's More!</span></div>
<div class="related-post">
<?php
$related = $post;
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'showposts'=>4, // Number of related posts that will be shown.
'caller_get_posts'=>1
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) {
echo '<ul class="relatedPosts">';
while ($my_query->have_posts()) {
$my_query->the_post();
?>
<li>
<div class="cat-image"> <a href="<?php echo get_permalink($_post->ID); ?>"><?php echo catch_that_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=130&h=100&src='); ?></a> </div>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php trim_title1(); ?>
</a></li>
<?php
}
echo '</ul>';
}
}
$post = $related;
wp_reset_query();
?>
<ul class="relatedPosts">
<?php $recent = new WP_Query("cat=all&showposts=4&offset=4"); while($recent->have_posts()) : $recent->the_post();?>
<li>
<div class="cat-image"> <a href="<?php echo get_permalink($_post->ID); ?>"><?php echo catch_that_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=130&h=100&src='); ?></a></div>
<a href="<?php echo get_permalink($_post->ID); ?>">
<?php trim_title(); ?>
</a> </li>
<?php endwhile; ?>
</ul>
</div>
<!-- "Related Posts Code" End -->
</div>
<div style="padding:4px 0; float:left;">
</div>
<!-- "Comment Form" Start -->
<div id="comments"> <a name="comments"></a>
<?php comments_template(); ?>
</div>
<!-- "Comment Form" End -->
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
</div>
<!-- end post -->
</div>
</div>
</div>
<!-- "Sidebar Include Code" Start "Avoid to edit" -->
<?php get_sidebar(); ?>
<!-- "Sidebar Include Code" End -->
</div>
</div>
<?php get_footer(); ?>
Comments.php
<?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() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
?>
<?php if ( have_comments() ) : ?>
<ol class="commentlist">
<h3>
<?php comments_number('Commentary', '1 Comment', '% Comments' );?>
on
<?php the_title(); ?>
</h3>
<?php wp_list_comments('type=comment&avatar_size=42');?>
</ol>
<div class="navigation">
<div class="alignleft">
<?php previous_comments_link() ?>
</div>
<div class="alignright">
<?php next_comments_link() ?>
</div>
</div>
<?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 open ?>
<!-- If comments are open. -->
<p class="nocomments">Comments are open.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- comment form -->
<div id="respond">
<div id="respond_inner">
<div id="respond_innerone">
<div id="respond_innertwo">
<div id="respond_innerthree">
<div id="respond_innerfour">
<div id="respond_innerfive">
<div id="respond_innersix">
<div class="postcomment">
<?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?>
</div>
<div class="cancel-comment-reply">
<?php cancel_comment_reply_link(); ?>
</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 »</a></p>
<?php else : ?>
<div class="comment-option-box">
<p class="name">
<input type="text" name="author" class="txt" id="commentauthor" tabindex="1" value="<?php _e('Name (required)', 'themeflicks'); ?>" onfocus="if (this.value == '<?php _e('Name (required)', 'themeflicks'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Name (required)', 'themeflicks'); ?>';}" />
</p>
<p class="name">
<input type="text" name="email" class="txt" id="email" tabindex="2" value="<?php _e('Email (required)', 'themeflicks'); ?>" onfocus="if (this.value == '<?php _e('Email (required)', 'themeflicks'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Email (required)', 'themeflicks'); ?>';}" />
</p>
<p class="name">
<input type="text" name="url" class="txt" id="url" tabindex="3" value="<?php _e('Website (optional)', 'themeflicks'); ?>" onfocus="if (this.value == '<?php _e('Website (optional)', 'themeflicks'); ?>') {this.value = '';}" onblur="if (this.value == '';)" />
</p>
</div>
<?php endif; ?>
<p class="comm-area">
<textarea name="comment" id="comment" rows="10" cols="50" tabindex="4" class="TextArea"></textarea>
</p>
<p>
<input name="submit" type="submit" class="SubmitComment" tabindex="5" value="Add Reply" />
<?php comment_id_fields(); ?>
</p>
<?php do_action('comment_form', $post->ID); ?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /comment form -->
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
404.php
<?php get_header(); ?>
<div id="bottom">
<div id="front-list">
<div class="breadcrumb"> <a href="<?php bloginfo('url'); ?>">Home</a> »
<?php the_category(' // ') ?>
</div>
<div class="post">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h3 class="archive-title">Archive for the <strong>‘
<?php single_cat_title(); ?>
’ </strong></h3>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h3 class="archive-title">Posts Tagged ‘
<?php single_tag_title(); ?>
’</h3>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h3 class="archive-title">Archive for
<?php the_time('F jS, Y'); ?>
</h3>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h3 class="archive-title">Archive for
<?php the_time('F, Y'); ?>
</h3>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h3 class="archive-title">Archive for
<?php the_time('Y'); ?>
</h3>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h3 class="archive-title">Author Archive</h3>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h3 class="archive-title">Blog Archives</h3>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<div class="recent-post">
<div class="recent-post-inner">
<h1><a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_title(); ?>
</a></h1>
<div class="post-meta"> <span class="time">
<?php the_time('j F, Y') ?>
</span></div>
<div class="post_image"> <a href="<?php echo get_permalink($_post->ID); ?>"><?php echo catch_that_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=160&h=120&src='); ?></a> </div>
<?php the_excerpt(); ?>
</div>
<div class="recent-meta"> <span class="comment" style="float:right;">
<?php comments_popup_link('No Comment', 'One Comment', '% Comments');?>
</span> </div>
</div>
<?php endwhile; ?>
</div>
<?php else : ?>
</div>
<?php endif; ?>
</div>
<!-- "Sidebar Include Code" Start "Avoid to edit" -->
<?php get_sidebar(); ?>
<!-- "Sidebar Include Code" End -->
</div>
</div>
<!-- "Footer Include Code" Start "Avoid to edit" -->
<?php get_footer(); ?>
<!-- "Footer Include Code" End -->