Display posts from specific category using a custom select query
-
Hi,I have this code and i want to display those posts from specific category…
<?$pop = $wpdb->get_results("SELECT id, post_title, comment_count FROM {$wpdb->prefix}posts WHERE post_type='post' ORDER BY comment_count DESC LIMIT 9"); foreach($pop as $post) : ?>
List posts….
<?php endforeach; ?>`
Thank you in advance.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Display posts from specific category using a custom select query’ is closed to new replies.