-
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
Feature: Allow filtering for multiple leagues #424
Comments
Any news on that? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Within my custom theme, I would like to be able to get data from the calendar for one, or multiple leagues.
At the Moment this is not possible due to the fact that the handled
$this->league
variable, always gets casted into an array.To be able to handle one or multiple values, I would like to add a check if the handed in data is already an array, or not.
This might also be useful for seasons and venues, but is currently outside the scope of my project.
Pull Request: #423
Detailed explanation
The Theme I am using is "Goodlayers - BigSlam" - https://goodlayers.com/portfolio/bigslam/
It is providing a layout builder block that allows to show events. The events can be filtered by: league, venue, season and more.
The block can be used within a shortcode, like e.g.:
[event_list title="" team="5383" league="150" season="45" venue="0" status="future" date="default" day="" number="4" order="ASC" columns="event,teams,time,league,season,venue,article" show_all_events_link="0" align="none" item_style="featured" recap_button="no"]
For the league it is possible to filter by exactly one league, or show them all:
league="150"
orleague=""
In addition, I would like to have the possibility to filter by multiple leagues:
league="150,148,145"
To allow that, I have adjusted the themes template within my child theme to process the data as follows:
The last step that is missing in the chain is the adjustment of the
data()
method within sportspress to alllow handling multiple leagues.The text was updated successfully, but these errors were encountered: