WP_Query orderby comment_count support
-
Hi,
Is there a reason the comment_count column in wp_posts table is not updated along with the transients? Because I would really love to be able to sort posts on facebook comment_count.
I did this myself like this:
Changeset_transient( $cache_key, $fb_count, 60*15);
To
set_transient( $cache_key, $fb_count, 60*60 ); // Standard = 60 x 15 $wpdb->update( $wpdb->posts, array('comment_count' => $fb_count ), array('ID' => $post_id) ); // Custom line
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Query orderby comment_count support’ is closed to new replies.