Support » Plugin: Facebook » 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:
    Change set_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

    https://wordpress.org/plugins/facebook/

Viewing 1 replies (of 1 total)
  • Thread Starter supertester

    (@supertester)

    I’ve managed to find another way without hacking the plugin, but still wondering why this is not standard?

Viewing 1 replies (of 1 total)
  • The topic ‘WP_Query orderby comment_count support’ is closed to new replies.