Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $comments = get_comments( array(
- 'post_status' => 'publish',
- 'meta_query' => array(
- 'relation' => 'OR',
- array(
- 'key' => 'cld_like_count',
- 'compare' => 'EXISTS',
- ),
- array(
- 'key' => 'cld_like_count',
- 'compare' => 'NOT EXISTS',
- ),
- ),
- 'orderby' => 'meta_value_num',
- 'order' => 'DESC',
- ) );
- // Temporarily disable threaded (nested) comments.
- add_filter( 'option_thread_comments', '__return_false' );
- wp_list_comments( array(
- 'callback' => 'listingo_comments',
- ), $comments );
- // Now remove the above filter.
- remove_filter( 'option_thread_comments', '__return_false' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement