Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author r-a-y

    (@r-a-y)

    Thank you for your enthusiasm!

    But, as I stated in the thread linked above, this requires work on my end to write a script to backfill the follow count for everybody on the site.

    And my time at the moment is a bit limited.

    Thread Starter Andrew

    (@sm60)

    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 (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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature request type=popular’ is closed to new replies.