Group Mods

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

Support: Creating & Extending

Existing and new plugins/components and themes.

Hooking the bp_ajax_querystring (4 posts)

Started 1 year, 11 months ago by: Ron Gauny

  • Profile picture of Ron Gauny Creative Modules said 1 year, 11 months ago:

    I’ve create a members page that lists members using the member-loop.php and that has a Google Map to the right of the list. How do I hook the bp_ajax_querystring response so I can update my map when a user click on the “All Members” or “Following” tabs?

  • Profile picture of Dwenaus Dwenaus said 1 year, 11 months ago:

    BP ajax is super slick, but a huge pain-in-the-ass when you’re trying to customize anything. That said, all the ajax goes through this file: /buddypress/bp-themes/bp-default/_inc/ajax.php so you can try to filter bp_dtheme_ajax_querystring in the default theme or bp_ajax_querystring in your own theme. Then there is the function just below that relating to wp_ajax_members_filter that might be useful to hook into. There is some magic happening in loading the template, which I tend to work around but dont fully understand. Good luck.

  • Profile picture of Ron Gauny Creative Modules said 1 year, 11 months ago:

    Hey @dwenaus! Thanks for the help. I will look into wp_ajax_members_filter etc.

  • Profile picture of David Lewis David Lewis said 1 year, 11 months ago:

    How do I get my child theme to override a function in the bp-default _inc/ajax.php file? The comments at the top of the file say that you can simply create your own ajax.php file but that does not seem to be working.