Modifying the search bar to add events search
-
Hi,
I am running wordpress MU with buddypress on top.
I have added the bp-events plugin.
Currently the search bar will only search members and groups and I would like for it to search through events too.
When I choose members in the dropdown list with the string x I see the following URL being called: http://mydomain.com/wpmu/members/?s=x
When I choose groups in the dropdown list with the string y I see the following URL being called: http://mydomain.com/wpmu/groups/?s=y
I have edited the file that builds the dropdown list and now it also contains the Events option but when I choose that option for some reason the URL being caled when I search for event z is: http://mydomain.com/wpmu/members/?s=z
I am not sure what I am doing wrong but it seems after my debugging that a parameter called _wp_http_referer is not getting the right value when the Events option is selected. instead of being wpmu/events/?s=z it is changing to wpmu/members/?s=z and this is what causing the URL to be wrong.
It would be great if someone can point me to a solution or to what I am doing wrong.
Thanks,
Shai
-
Anyone has any ideas here?
Thanks,
Shai
Have you talked to the author of bp-events?
I am waiting for a response on his forum too but I am sure someone else have changed this search bar to contain something other than just the default.
I was able to figure it out on my own. Thanks.
Please share. Others might have this challenge in the future.
Sorry, I was too busy pulling my hair out trying to figure out how to make AJAX work in 1.2…
Please give us your solution so I may be able to implement it as standard…
Two places you will want to hook into…
The
bp_search_form_type_select
filter will let you modify the drop down…The
bp_core_action_search_site
filter will let you filter the results…
- The topic ‘Modifying the search bar to add events search’ is closed to new replies.