我正在使用comments_popup_link()
函数显示循环中每个帖子的注释数。
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( get_post_meta($post->ID, \'thumb_value\', true) ) : ?>
//something
<?php else: ?>
//something else
<?php endif; ?>
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php the_content(__(\'Read more\'));?>
<div class="post-meta">
<?php the_time(\'F j, Y\'); ?>
<p>Category: <?php the_category(\', \'); ?></p>
<p><?php the_tags(); ?></p>
<p><?php comments_popup_link(\'Post Comment\', \'1 Comment\', \'% Comments\'); ?></p>
</div>
<?php endwhile; ?>
<?php $wpdb->show_errors();
$wpdb->print_error(); ?>
<?php else: ?>
<p><strong>There has been an error.</strong></p>
<?php $wpdb->show_errors(); ?>
<?php $wpdb->print_error(); ?> </p>
<?php endif; ?>
一切都很好,但我WordPress数据库错误:[]从wp\\U comments中选择*,其中comment\\u post\\u ID=216,comment\\u approved=1按comment\\u date\\u gmt DESC排序
我只是个古玩为什么我会那样。。