{"id":2210,"date":"2023-10-09T10:34:51","date_gmt":"2023-10-09T10:34:51","guid":{"rendered":"https:\/\/academiabellesarts.org\/events-list-style\/"},"modified":"2023-11-10T09:01:39","modified_gmt":"2023-11-10T09:01:39","slug":"events-list-style","status":"publish","type":"page","link":"https:\/\/academiabellesarts.org\/esp\/events-list-style\/","title":{"rendered":"Events \u2013 List Style"},"content":{"rendered":"                <div class='mage list_with_filter_section mep_event_list' id='mage-container'>\n\t\t\t\t\tThere are currently no events scheduled.                <\/div>\n                <script>\n                    jQuery(document).ready(function () {\n                        var containerEl = document.querySelector('#mep_event_list_abr69fb06ac9238b');\n                        var mixer = mixitup(containerEl, {\n                            selectors: {\n                                target: '.mep-event-list-loop',\n                                control: '[data-mixitup-control]'\n                            }\n                        });\n                        \/\/ Handle title filter input\n                        jQuery('input[name=\"filter_with_title\"]').on('keyup', function () {\n                            var searchText = jQuery(this).val().toLowerCase();\n                            var items = jQuery('.mep-event-list-loop');\n                            items.each(function () {\n                                var itemTitle = jQuery(this).data('title').toLowerCase();\n                                if (itemTitle.indexOf(searchText) > -1) {\n                                    jQuery(this).show();\n                                } else {\n                                    jQuery(this).hide();\n                                }\n                            });\n                        });\n                        \/\/ Handle date filter change\n                        jQuery('input[name=\"filter_with_date\"]').on('change', function () {\n                            var selectedDate = jQuery(this).val();\n                            var items = jQuery('.mep-event-list-loop');\n                            if (!selectedDate) {\n                                items.show();\n                            } else {\n                                var filterDate = new Date(selectedDate);\n                                filterDate.setHours(0, 0, 0, 0); \/\/ Reset time part for date comparison\n                                items.each(function () {\n                                    var itemDate = new Date(jQuery(this).data('date'));\n                                    itemDate.setHours(0, 0, 0, 0); \/\/ Reset time part for date comparison\n                                    if (itemDate.getTime() === filterDate.getTime()) {\n                                        jQuery(this).show();\n                                    } else {\n                                        jQuery(this).hide();\n                                    }\n                                });\n                            }\n                        });\n                        \/\/ Handle state filter change\n                        jQuery('select[name=\"filter_with_state\"]').on('change', function () {\n                            var state = jQuery(this).val();\n                            var items = jQuery('.mep-event-list-loop');\n                            if (state === '') {\n                                items.show();\n                            } else {\n                                items.each(function () {\n                                    var itemState = jQuery(this).data('state');\n                                    if (itemState === state) {\n                                        jQuery(this).show();\n                                    } else {\n                                        jQuery(this).hide();\n                                    }\n                                });\n                            }\n                        });\n                        \/\/ Handle city filter change\n                        jQuery('select[name=\"filter_with_city\"]').on('change', function () {\n                            applyAllFilters();\n                        });\n                        \/\/ Handle category filter change\n                        jQuery('select[name=\"filter_with_category\"]').on('change', function () {\n                            applyAllFilters();\n                        });\n                        \/\/ Handle organizer filter change\n                        jQuery('select[name=\"filter_with_organizer\"]').on('change', function () {\n                            applyAllFilters();\n                        });\n                        \/\/ Combined filter function that applies all filters\n                        function applyAllFilters() {\n                            var titleFilter = jQuery('input[name=\"filter_with_title\"]').val().toLowerCase();\n                            var dateFilter = jQuery('input[name=\"filter_with_date\"]').val();\n                            var stateFilter = jQuery('select[name=\"filter_with_state\"]').val();\n                            var cityFilter = jQuery('select[name=\"filter_with_city\"]').val();\n                            var categoryFilter = jQuery('select[name=\"filter_with_category\"]').val();\n                            var organizerFilter = jQuery('select[name=\"filter_with_organizer\"]').val();\n                            var visibleCount = 0;\n                            jQuery('.mep-event-list-loop').each(function () {\n                                var $item = jQuery(this);\n                                var show = true;\n                                \/\/ Title filter\n                                if (titleFilter) {\n                                    var itemTitle = ($item.data('title') || '').toLowerCase();\n                                    if (itemTitle.indexOf(titleFilter) === -1) {\n                                        show = false;\n                                    }\n                                }\n                                \/\/ Date filter\n                                if (show && dateFilter) {\n                                    var itemDate = $item.data('date');\n                                    if (itemDate) {\n                                        var filterDate = new Date(dateFilter);\n                                        filterDate.setHours(0, 0, 0, 0);\n                                        var itemDateObj = new Date(itemDate);\n                                        itemDateObj.setHours(0, 0, 0, 0);\n                                        if (itemDateObj.getTime() !== filterDate.getTime()) {\n                                            show = false;\n                                        }\n                                    } else {\n                                        show = false;\n                                    }\n                                }\n                                \/\/ State filter\n                                if (show && stateFilter) {\n                                    var itemState = $item.data('state') || '';\n                                    if (itemState !== stateFilter) {\n                                        show = false;\n                                    }\n                                }\n                                \/\/ City filter\n                                if (show && cityFilter) {\n                                    var itemCity = $item.data('city-name') || '';\n                                    if (itemCity !== cityFilter) {\n                                        show = false;\n                                    }\n                                }\n                                \/\/ Category filter\n                                if (show && categoryFilter) {\n                                    var itemCategory = $item.data('category') || '';\n                                    \/\/ Check if category matches (can be comma-separated)\n                                    var itemCategories = itemCategory.split(',').map(function (c) {\n                                        return c.trim();\n                                    });\n                                    if (itemCategories.indexOf(categoryFilter) === -1) {\n                                        show = false;\n                                    }\n                                }\n                                \/\/ Organizer filter\n                                if (show && organizerFilter) {\n                                    var itemOrganizer = $item.data('organizer') || '';\n                                    \/\/ Check if organizer matches (can be comma-separated)\n                                    var itemOrganizers = itemOrganizer.split(',').map(function (o) {\n                                        return o.trim();\n                                    });\n                                    if (itemOrganizers.indexOf(organizerFilter) === -1) {\n                                        show = false;\n                                    }\n                                }\n                                if (show) {\n                                    $item.show();\n                                    visibleCount++;\n                                } else {\n                                    $item.hide();\n                                }\n                            });\n                            \/\/ Update count display\n                            jQuery('.qty_count').text(visibleCount);\n                        }\n                        \/\/ Update title filter to use combined function\n                        jQuery('input[name=\"filter_with_title\"]').off('keyup').on('keyup', function () {\n                            applyAllFilters();\n                        });\n                        \/\/ Update date filter to use combined function\n                        jQuery('input[name=\"filter_with_date\"]').off('change').on('change', function () {\n                            applyAllFilters();\n                        });\n                        \/\/ Update state filter to use combined function\n                        jQuery('select[name=\"filter_with_state\"]').off('change').on('change', function () {\n                            applyAllFilters();\n                        });\n\t\t\t\t\t\t                    });\n                <\/script>\n                \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":20,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-2210","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/academiabellesarts.org\/esp\/events-list-style\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academiabellesarts.org\/esp\/events-list-style\/\" \/>\n<meta property=\"og:site_name\" content=\"Acad\u00e8mia de Belles Arts de Sabadell FP\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-10T09:01:39+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/academiabellesarts.org\/events-list-style\/\",\"url\":\"https:\/\/academiabellesarts.org\/events-list-style\/\",\"name\":\"Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP\",\"isPartOf\":{\"@id\":\"https:\/\/academiabellesarts.org\/#website\"},\"datePublished\":\"2023-10-09T10:34:51+00:00\",\"dateModified\":\"2023-11-10T09:01:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/academiabellesarts.org\/events-list-style\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/academiabellesarts.org\/events-list-style\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/academiabellesarts.org\/events-list-style\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\/\/academiabellesarts.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Events \u2013 List Style\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/academiabellesarts.org\/#website\",\"url\":\"https:\/\/academiabellesarts.org\/\",\"name\":\"Acad\u00e8mia de Belles Arts de Sabadell FP\",\"description\":\"Entitat dedicada a la promoci\u00f3 i divulgaci\u00f3 de la cultura art\u00edstica local\",\"publisher\":{\"@id\":\"https:\/\/academiabellesarts.org\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/academiabellesarts.org\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/academiabellesarts.org\/#organization\",\"name\":\"Acad\u00e8mia de Belles Arts de Sabadell FP\",\"url\":\"https:\/\/academiabellesarts.org\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/academiabellesarts.org\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/academiabellesarts.org\/wp-content\/uploads\/2024\/03\/cropped-logos-junts.png\",\"contentUrl\":\"https:\/\/academiabellesarts.org\/wp-content\/uploads\/2024\/03\/cropped-logos-junts.png\",\"width\":3367,\"height\":960,\"caption\":\"Acad\u00e8mia de Belles Arts de Sabadell FP\"},\"image\":{\"@id\":\"https:\/\/academiabellesarts.org\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.instagram.com\/academiabellesarts\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/academiabellesarts.org\/esp\/events-list-style\/","og_locale":"es_ES","og_type":"article","og_title":"Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP","og_url":"https:\/\/academiabellesarts.org\/esp\/events-list-style\/","og_site_name":"Acad\u00e8mia de Belles Arts de Sabadell FP","article_modified_time":"2023-11-10T09:01:39+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/academiabellesarts.org\/events-list-style\/","url":"https:\/\/academiabellesarts.org\/events-list-style\/","name":"Events \u2013 List Style - Acad\u00e8mia de Belles Arts de Sabadell FP","isPartOf":{"@id":"https:\/\/academiabellesarts.org\/#website"},"datePublished":"2023-10-09T10:34:51+00:00","dateModified":"2023-11-10T09:01:39+00:00","breadcrumb":{"@id":"https:\/\/academiabellesarts.org\/events-list-style\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academiabellesarts.org\/events-list-style\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/academiabellesarts.org\/events-list-style\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/academiabellesarts.org\/"},{"@type":"ListItem","position":2,"name":"Events \u2013 List Style"}]},{"@type":"WebSite","@id":"https:\/\/academiabellesarts.org\/#website","url":"https:\/\/academiabellesarts.org\/","name":"Acad\u00e8mia de Belles Arts de Sabadell FP","description":"Entitat dedicada a la promoci\u00f3 i divulgaci\u00f3 de la cultura art\u00edstica local","publisher":{"@id":"https:\/\/academiabellesarts.org\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/academiabellesarts.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/academiabellesarts.org\/#organization","name":"Acad\u00e8mia de Belles Arts de Sabadell FP","url":"https:\/\/academiabellesarts.org\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/academiabellesarts.org\/#\/schema\/logo\/image\/","url":"https:\/\/academiabellesarts.org\/wp-content\/uploads\/2024\/03\/cropped-logos-junts.png","contentUrl":"https:\/\/academiabellesarts.org\/wp-content\/uploads\/2024\/03\/cropped-logos-junts.png","width":3367,"height":960,"caption":"Acad\u00e8mia de Belles Arts de Sabadell FP"},"image":{"@id":"https:\/\/academiabellesarts.org\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.instagram.com\/academiabellesarts\/"]}]}},"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/academiabellesarts.org\/esp\/author\/admin_2ekuakj4\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/pages\/2210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/comments?post=2210"}],"version-history":[{"count":0,"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/pages\/2210\/revisions"}],"wp:attachment":[{"href":"https:\/\/academiabellesarts.org\/esp\/wp-json\/wp\/v2\/media?parent=2210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}