Unknown table ‘wp_posts’ in group statement
-
I am getting a new error:
WordPress database error: [Unknown table ‘wp_posts’ in group statement]
SELECT ID, post_title FROM wp_posts p LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id LEFT JOIN wp_ak_popularity pop ON p.ID = pop.post_id WHERE tt.term_id = '467' AND tt.taxonomy = 'category' AND post_status = 'publish' AND post_type = 'post' AND post_date < NOW() GROUP BY wp_posts.ID ORDER BY pop.total DESC LIMIT 10
This happens only on the categories pages:Example
Other requests work fine: Example
wp_posts does exist…
Here is the php code from the widget:
<?php /* If this is a 404 page */ if (is_404()) { ?> <?php /* If this is a category archive */ } elseif (is_category()) { ?> <p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p> <li><h2>Most Popular in '<?php single_cat_title(''); ?>'</h2> <ul> <?php akpc_most_popular_in_cat(); ?> </ul> </li> <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for the day <?php the_time('l, F jS, Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for <?php the_time('F, Y'); ?>.</p> <li><h2>Most Popular in <?php the_time('F, Y'); ?></h2> <ul> <?php akpc_most_popular_in_month(); ?> </ul> </li> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for the year <?php the_time('Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> <p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p> <?php } ?> <?php if (!is_archive() && !is_category()) { ?> <li><h2>Most Popular Posts</h2> <ul> <?php akpc_most_popular(); ?> </ul> </li> <?php } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Unknown table ‘wp_posts’ in group statement’ is closed to new replies.