Title: Andrew's Replies | WordPress.org

---

# Andrew

  [  ](https://wordpress.org/support/users/sm60/)

 *   [Profile](https://wordpress.org/support/users/sm60/)
 *   [Topics Started](https://wordpress.org/support/users/sm60/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sm60/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sm60/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sm60/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sm60/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sm60/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BuddyPress Follow] Feature request type=popular](https://wordpress.org/support/topic/feature-request-typepopular/)
 *  Thread Starter [Andrew](https://wordpress.org/support/users/sm60/)
 * (@sm60)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/feature-request-typepopular/#post-7057299)
 * I might try work out how do this. I’ve also been trying to work out for a few
   months how to do something similar to this – popular posts – sort posts in order
   from most favorited to least favorited. I finally found out how to do this yesterday
   after discovering this script by imath here:
    [https://github.com/imath/bp-loop-filters/blob/master/bp-loop-filters.php](https://github.com/imath/bp-loop-filters/blob/master/bp-loop-filters.php)(
   see bottom half)
 * This allows you to do this:
 *     ```
       // Example of displaying Popular posts (order posts by most favorited to least favorited)
   
       function my_filter_activity( $loop ) { 
   
       	if ( is_page( 'custom-page' )) {
       		$loop['meta_query'] = array(
       			array(
       				'key'     => 'favorite_count',
       				'value'   => 1,
       				'type'    => 'numeric',
       				'compare' => '>='
       			),
       		);
       	}
   
       	return $loop;
       }
       add_filter( 'bp_after_has_activity_parse_args', 'my_filter_activity' );
       ```
   
 * Is it possible to order members by most followed to least followed by creating
   something very similar to the above code? Or does there need to be more work?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Responsive Lightbox & Gallery] Enabling Custom events](https://wordpress.org/support/topic/enabling-custom-events/)
 *  Thread Starter [Andrew](https://wordpress.org/support/users/sm60/)
 * (@sm60)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enabling-custom-events/#post-6000766)
 * Brilliant, thanks, I’ll try it.

Viewing 2 replies - 1 through 2 (of 2 total)