Skip to:

creating a group type page

  • louie171



    I’ve created a group_type page (template) based on the groups loop like this:

    $args = array(‘group_type’ => ‘uk’);
    (bp_has_groups( $args )

    it works well, but if I change the order select or search all the groups show ( because the page is reloading via ajax)

    My issue is I don’t know where to start looking, so I can pass my args array to filter the ajax stuff to the relevant group_type.

    Can anyone push me in the right direction ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, those details are parsed in bp_ajax_querystring(), and there’s a filter you can work with: bp_ajax_querystring.

    You can also filter the query args for every bp_has_groups() loop directly, using the filter bp_after_has_groups_parse_args.

    However, the simpler answer is probably to use your group type’s built-in directory page, which would have a URL like groups/types/uk and then the AJAX stuff is already aware that your view is limited to a single type.



    thanks David, I think I’ll probably go with your suggestion and use the groups built-in directory page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar