We need a page that will list each session in the day and time slot it appears.
I created a loop that lists each session, it's number, title, speaker names and learning units. All the sessions are in one long list. (see code below for reference)
Now I need to learn what conditional code to use so that a session will appear in the list according to its day/time. Please see the conference page we had last year that I created manually in a table. I need my Toolset content to appear similarly. hidden link
Example of days times are:
Wednesday 9:00 - 10:00am
Wednesday 2:00 - 3:00 pm
Thursday 11:00 - 12:00 pm
Thursday 3:00 - 4:00 pm
I have custom fields in checkboxes for the days and for each time individually.
What you're trying to setup is essentially a timetable correct?
This would be possible but you will need to setup multiple views for this. For e.g you will need to create a view for each of the days. then filter that view to only lists the posts for that day.
Then you will need to order the display by the time custom field. There would still be a challenge when it comes to the time groupings.
Well, thanks for the Timetable plugin suggestion. However, we purchased Toolset so we could use just one program for our conference.
So, you mentioned This would be possible but you will need to setup multiple views for this. For e.g you will need to create a view for each of the days. then filter that view to only lists the posts for that day.
Could you please give me the exact code for that "filter"...possibly using my code above in the example?
I can probably figure out how to order the display by the time custom field.
As mentioned above, could you please give me the exact code for that "filter"...with detailed instructions on where to put it in my functions.php file?
Also, what conditional code do I need to add to my existing code (posted below) to make that filter work? (this is the code I shared in the original post) As a reminder, I am still learning conditional coding so I need to know exactly where to put the code.
So lets say we have a select custom field where we have the Days of the week.
Then we select for 1 session that it should be on Mondays. Now we will need to create a view that will list the posts for each day respectively so in essence 7 views will be needed.
So we will filter each view based on the day of the session so each view will display posts for a different day. See Screenshot for filter example
This filter will allow the view to display all the posts that are set for Monday. This is just an example in the simplest form.
For your specific case you have time sub divisions meaning your posts are separated by days and by time.
So you will need 2 filters for each view and that will take the amount of views from just 7 to 7 times the amount of hourly subdivisions.
Finally you view filter will look something like this. See Combination screenshot.
Now here we have a view that will list out All the sessions for Mondays between the times of 8:00am - 9:00am
Ofcourse you will need to setup a custom field with these time divisions as well in order to filter for them.
Please let me know if this is clear 🙂 if there is anything you are unsure about please let me know.