Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Alphabetical by default change RESULTS in SEARCH not working for Groups… (2 posts)

Started 9 months, 1 week ago by: Pisanojm

  • Profile picture of Pisanojm Pisanojm said 9 months, 1 week ago:

    I posted this four months ago, but have not got a reply and can’t find it here so here it goes again… I’m hoping somebody can help with this:

    Is there any reason using the following code would make the groups return “There were no groups found” when searched?

    Here is the function I am using, and it works as it should, but now the groups can’t be searched for text… That is, when I put a search term in nothing shows up in the results other than “There were not groups found” EVEN it is a word in the group title…

    //alphabetical by default
    
    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’ );

    Help here?

  • Profile picture of Stigmartyr Stigmartyr said 9 months, 1 week ago:

    Does that code replace the previous default or is that in addition to the code?

    Sounds like the search feature is designed to query things one way, maybe the search needs to be modified too?. Does this issue match anything reported in the bug database for Buddypress?

    I’m stabbing in the dark here.