-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to filter in API by team ID? #444
Comments
Hello https://wordpress.stackexchange.com/questions/251527/wp-rest-api-filter-by-category-1-and-category-2 Since WP 4.7, filter has been removed from WP-API. |
I've installed this plugin, but I still can't get the events for the team. I gets the result for all events. Does it work for you? I'm also developing a mobile app and it would make it easier for me to implement a list of events. |
Yes, I am getting the same errors. I am trying to adapt codecanyon my-team-soccer-football-cricket developer for mobile app. |
In my opinion, this is not a Wordpress problem, because I can filter by other fields, e.g. https://amatorkamp.pl/wp-json/sportspress/v2/events?leagues=116 works without a problem. Can any of the creators say why it is not possible to filter in all fields? As for the application, I create the application from the beginning myself in SwiftUI. |
I just tried : https://amatorkamp.pl/wp-json/sportspress/v2/events?teams=1396
|
This filter is not working. You receive a reply that contains teams not used in this address: https://amatorkamp.pl/wp-json/sportspress/v2/events?teams=1396 "Teams": [ |
Change in function block |
Hmm. I'll try. But the strange thing is that the search works on other fields. such as: "seasons": [ |
Seasons, Leagues and Venues are Custom Taxonomies of the Event, while the Teams, the Players, the Stats etc, are post-meta data. Maybe that is the reason why while you can filter by season, you cannot by teams. |
Do you know how to add something in the code to be able to search for teams? |
My API looks like this - https://amatorkamp.pl/wp-json/sportspress/v2/events
Why does filtering this way not work? https://amatorkamp.pl/wp-json/sportspress/v2/events?teams=1396
Do I need to configure something?
The text was updated successfully, but these errors were encountered: