Groups/Members alphabetical sort by default
- 
		I was using the function below before on our site to sort the groups alphabetically but since the latest update, it made all the ajax pagination stop working. I looked at the release notes and there was the following “Only run BP-Default AJAX functions if a POST request.” – I can’t find any information about this change but I am running a child theme so wondered if this would have affected the below. Does anyone have an alternative solution for showing alphabetical by default? `function sort_alpha_by_default( $qs ) { 
 global $bp;
 if (!$qs && ( $bp->current_component == BP_GROUPS_SLUG || $bp->current_component == BP_MEMBERS_SLUG ) )
 $qs = ‘type=alphabetical&action=alphabetical’;
 return $qs;
 }
 function groups_alpha_by_default( $query_string ) {
 global $bp;if ( $bp->current_component == BP_GROUPS_SLUG && !$bp->current_action) 
 $query_string = ‘type=alphabetical&action=alphabetical’;return $query_string; 
 }
 add_filter( ‘bp_dtheme_ajax_querystring’, ‘groups_alpha_by_default’ );add_filter( ‘bp_dtheme_ajax_querystring’, ‘sort_alpha_by_default’ );` 
- The topic ‘Groups/Members alphabetical sort by default’ is closed to new replies.