home banner

Calendar Test Page

Iterating on Library Hours

Here's the eventArgs array:

Array
(
    [post_type] => event
    [posts_per_page] => -1
    [post_status] => publish
    [meta_query] => Array
        (
            [relation] => AND
            [0] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => >=
                    [type] => DATE
                )

            [1] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => <=
                    [type] => DATE
                )

        )

    [tax_query] => Array
        (
            [0] => Array
                (
                    [taxonomy] => event-categories
                    [field] => term_id
                    [terms] => 17
                )

        )

    [orderby] => meta_value
    [order] => DESC
)

/n

Here's the eventResult array returned from the query:

Array
(
    [0] => WP_Post Object
        (
            [ID] => 194649
            [post_author] => 32
            [post_date] => 2023-03-23 14:05:34
            [post_date_gmt] => 2023-03-23 19:05:34
            [post_content] => 
            [post_title] => 8:00am-5:00pm
            [post_excerpt] => 
            [post_status] => publish
            [comment_status] => closed
            [ping_status] => closed
            [post_password] => 
            [post_name] => 800am-500pm-7-2023-08-09
            [to_ping] => 
            [pinged] => 
            [post_modified] => 2023-05-24 13:03:23
            [post_modified_gmt] => 2023-05-24 18:03:23
            [post_content_filtered] => 
            [post_parent] => 0
            [guid] => https://library.truman.edu/schedule/800am-500pm-7-2023-08-09/
            [menu_order] => 0
            [post_type] => event
            [post_mime_type] => 
            [comment_count] => 0
            [filter] => raw
        )

)

/nevents Arr so far:
Array
(
    [0] => Array
        (
            [category_id] => 17
            [category_name] => Library Hours
            [category_slug] => library-hours
            [calender_page] => https://library.truman.edu/library-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 194649
            [post_title] => 8:00am-5:00pm
            [post_name] => 800am-500pm-7-2023-08-09
            [today_event_id] => 194649
            [today_event_name] => 8:00am-5:00pm
            [today_event_start] => 2023-08-09 00:00:00
            [today_event_end] => 2023-08-09 00:00:00
        )

)

Iterating on Special Collections

Here's the eventArgs array:

Array
(
    [post_type] => event
    [posts_per_page] => -1
    [post_status] => publish
    [meta_query] => Array
        (
            [relation] => AND
            [0] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => >=
                    [type] => DATE
                )

            [1] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => <=
                    [type] => DATE
                )

        )

    [tax_query] => Array
        (
            [0] => Array
                (
                    [taxonomy] => event-categories
                    [field] => term_id
                    [terms] => 18
                )

        )

    [orderby] => meta_value
    [order] => DESC
)

/n

Here's the eventResult array returned from the query:

Array
(
    [0] => WP_Post Object
        (
            [ID] => 196552
            [post_author] => 32
            [post_date] => 2023-05-23 12:14:21
            [post_date_gmt] => 2023-05-23 17:14:21
            [post_content] => 
            [post_title] => 8:00am - 5:00pm
            [post_excerpt] => 
            [post_status] => publish
            [comment_status] => closed
            [ping_status] => closed
            [post_password] => 
            [post_name] => 800am-500pm-4-2023-08-09
            [to_ping] => 
            [pinged] => 
            [post_modified] => 2023-05-23 12:16:36
            [post_modified_gmt] => 2023-05-23 17:16:36
            [post_content_filtered] => 
            [post_parent] => 0
            [guid] => https://library.truman.edu/schedule/800am-500pm-4-2023-08-09/
            [menu_order] => 0
            [post_type] => event
            [post_mime_type] => 
            [comment_count] => 0
            [filter] => raw
        )

)

/nevents Arr so far:
Array
(
    [0] => Array
        (
            [category_id] => 17
            [category_name] => Library Hours
            [category_slug] => library-hours
            [calender_page] => https://library.truman.edu/library-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 194649
            [post_title] => 8:00am-5:00pm
            [post_name] => 800am-500pm-7-2023-08-09
            [today_event_id] => 194649
            [today_event_name] => 8:00am-5:00pm
            [today_event_start] => 2023-08-09 00:00:00
            [today_event_end] => 2023-08-09 00:00:00
        )

    [1] => Array
        (
            [category_id] => 18
            [category_name] => Special Collections
            [category_slug] => special-collections
            [calender_page] => https://library.truman.edu/special-collections-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 196552
            [post_title] => 8:00am - 5:00pm
            [post_name] => 800am-500pm-4-2023-08-09
            [today_event_id] => 196552
            [today_event_name] => 8:00am - 5:00pm
            [today_event_start] => 2023-08-09 08:00:00
            [today_event_end] => 2023-08-09 17:00:00
        )

)

Iterating on IT Service Center

Here's the eventArgs array:

Array
(
    [post_type] => event
    [posts_per_page] => -1
    [post_status] => publish
    [meta_query] => Array
        (
            [relation] => AND
            [0] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => >=
                    [type] => DATE
                )

            [1] => Array
                (
                    [key] => _event_start_local
                    [value] => 2023-08-09 00:00:00
                    [compare] => <=
                    [type] => DATE
                )

        )

    [tax_query] => Array
        (
            [0] => Array
                (
                    [taxonomy] => event-categories
                    [field] => term_id
                    [terms] => 22
                )

        )

    [orderby] => meta_value
    [order] => DESC
)

/n

Here's the eventResult array returned from the query:

Array
(
    [0] => WP_Post Object
        (
            [ID] => 195504
            [post_author] => 23
            [post_date] => 2022-09-29 09:41:24
            [post_date_gmt] => 2022-09-29 14:41:24
            [post_content] => 
            [post_title] => 8:00am - 5:00pm
            [post_excerpt] => 
            [post_status] => publish
            [comment_status] => closed
            [ping_status] => closed
            [post_password] => 
            [post_name] => 800-a-m-500-p-m-2023-08-09
            [to_ping] => 
            [pinged] => 
            [post_modified] => 2023-08-02 14:45:36
            [post_modified_gmt] => 2023-08-02 19:45:36
            [post_content_filtered] => 
            [post_parent] => 0
            [guid] => https://library.truman.edu/schedule/800-a-m-500-p-m-2023-08-09/
            [menu_order] => 0
            [post_type] => event
            [post_mime_type] => 
            [comment_count] => 0
            [filter] => raw
        )

)

/nevents Arr so far:
Array
(
    [0] => Array
        (
            [category_id] => 17
            [category_name] => Library Hours
            [category_slug] => library-hours
            [calender_page] => https://library.truman.edu/library-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 194649
            [post_title] => 8:00am-5:00pm
            [post_name] => 800am-500pm-7-2023-08-09
            [today_event_id] => 194649
            [today_event_name] => 8:00am-5:00pm
            [today_event_start] => 2023-08-09 00:00:00
            [today_event_end] => 2023-08-09 00:00:00
        )

    [1] => Array
        (
            [category_id] => 18
            [category_name] => Special Collections
            [category_slug] => special-collections
            [calender_page] => https://library.truman.edu/special-collections-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 196552
            [post_title] => 8:00am - 5:00pm
            [post_name] => 800am-500pm-4-2023-08-09
            [today_event_id] => 196552
            [today_event_name] => 8:00am - 5:00pm
            [today_event_start] => 2023-08-09 08:00:00
            [today_event_end] => 2023-08-09 17:00:00
        )

    [2] => Array
        (
            [category_id] => 22
            [category_name] => IT Service Center
            [category_slug] => it-service-center
            [calender_page] => https://library.truman.edu/it-service-center-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 195504
            [post_title] => 8:00am - 5:00pm
            [post_name] => 800-a-m-500-p-m-2023-08-09
            [today_event_id] => 195504
            [today_event_name] => 8:00am - 5:00pm
            [today_event_start] => 2023-08-09 08:00:00
            [today_event_end] => 2023-08-09 17:00:00
        )

)
Array
(
    [0] => Array
        (
            [category_id] => 17
            [category_name] => Library Hours
            [category_slug] => library-hours
            [calender_page] => https://library.truman.edu/library-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 194649
            [post_title] => 8:00am-5:00pm
            [post_name] => 800am-500pm-7-2023-08-09
            [today_event_id] => 194649
            [today_event_name] => 8:00am-5:00pm
            [today_event_start] => 2023-08-09 00:00:00
            [today_event_end] => 2023-08-09 00:00:00
        )

    [1] => Array
        (
            [category_id] => 18
            [category_name] => Special Collections
            [category_slug] => special-collections
            [calender_page] => https://library.truman.edu/special-collections-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 196552
            [post_title] => 8:00am - 5:00pm
            [post_name] => 800am-500pm-4-2023-08-09
            [today_event_id] => 196552
            [today_event_name] => 8:00am - 5:00pm
            [today_event_start] => 2023-08-09 08:00:00
            [today_event_end] => 2023-08-09 17:00:00
        )

    [2] => Array
        (
            [category_id] => 22
            [category_name] => IT Service Center
            [category_slug] => it-service-center
            [calender_page] => https://library.truman.edu/it-service-center-hours
            [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
            [post_id] => 195504
            [post_title] => 8:00am - 5:00pm
            [post_name] => 800-a-m-500-p-m-2023-08-09
            [today_event_id] => 195504
            [today_event_name] => 8:00am - 5:00pm
            [today_event_start] => 2023-08-09 08:00:00
            [today_event_end] => 2023-08-09 17:00:00
        )

)

Heres the array iterated on for selecting the dropdown display. bkey = 0

Array
(
    [category_id] => 17
    [category_name] => Library Hours
    [category_slug] => library-hours
    [calender_page] => https://library.truman.edu/library-hours
    [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
    [post_id] => 194649
    [post_title] => 8:00am-5:00pm
    [post_name] => 800am-500pm-7-2023-08-09
    [today_event_id] => 194649
    [today_event_name] => 8:00am-5:00pm
    [today_event_start] => 2023-08-09 00:00:00
    [today_event_end] => 2023-08-09 00:00:00
)

Adding to calendar for bkey 0:

Choosing primary button HTML.

dropCalenderHtml1:

dropCalenderHtml2:

Heres the array iterated on for selecting the dropdown display. bkey = 1

Array
(
    [category_id] => 18
    [category_name] => Special Collections
    [category_slug] => special-collections
    [calender_page] => https://library.truman.edu/special-collections-hours
    [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
    [post_id] => 196552
    [post_title] => 8:00am - 5:00pm
    [post_name] => 800am-500pm-4-2023-08-09
    [today_event_id] => 196552
    [today_event_name] => 8:00am - 5:00pm
    [today_event_start] => 2023-08-09 08:00:00
    [today_event_end] => 2023-08-09 17:00:00
)

Adding to calendar for bkey 1:

Choosing secondary button HTML.

dropCalenderHtml1:

dropCalenderHtml2:

Heres the array iterated on for selecting the dropdown display. bkey = 2

Array
(
    [category_id] => 22
    [category_name] => IT Service Center
    [category_slug] => it-service-center
    [calender_page] => https://library.truman.edu/it-service-center-hours
    [category_image] => https://library.truman.edu/wp-content/uploads/2022/06/Hrs_Icon.svg
    [post_id] => 195504
    [post_title] => 8:00am - 5:00pm
    [post_name] => 800-a-m-500-p-m-2023-08-09
    [today_event_id] => 195504
    [today_event_name] => 8:00am - 5:00pm
    [today_event_start] => 2023-08-09 08:00:00
    [today_event_end] => 2023-08-09 17:00:00
)

Adding to calendar for bkey 2:

Choosing secondary button HTML.

dropCalenderHtml1:

dropCalenderHtml2: