{"id":9699,"date":"2019-12-19T05:36:33","date_gmt":"2019-12-19T05:36:33","guid":{"rendered":"https:\/\/wordherd.io\/?p=9699"},"modified":"2019-12-19T05:36:33","modified_gmt":"2019-12-19T05:36:33","slug":"filter-recurring-events-from-event-manager-listings","status":"publish","type":"post","link":"https:\/\/wordherd.io\/de\/blog\/filter-recurring-events-from-event-manager-listings\/","title":{"rendered":"Filter Recurring Events from Event Manager for WordPress Listings"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">At WordHerd we migrate a large volume of websites on a regular basis and in doing so, we often come across the need for an Events Calendar. We&#8217;ve used many over the years, but have really settled on Events Manager for WordPress because, unlike others we&#8217;ve tried, it is very reliable and never lets us down.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a recent project we came across a unique scenario that we didn&#8217;t think the Events Manager was going to be able to handle, but lo and behold, it came through. The Events Listing page on this particular site separated the recurring events separate from the non-recurring events. The challenge was to fulfill this requirement while maintaining the filtering and pagination.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/wp-events-plugin.com\/documentation\/\">documentation<\/a> offers a lot of great resources, but the filters and hooks are left to the user to discover in the <a href=\"https:\/\/github.com\/bippo\/events-manager-wordpress\/\">Events Manager for WordPress API repo<\/a>. After some digging we were able to filter the sql conditions and ensure no recurring events were included in the final results.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add_filter('em_events_build_sql_conditions','em_events_filter_recurrences',1,2);\nfunction em_events_filter_recurrences($sql, $args) {\n  $sql['recurrence'] = '(`recurrence` IS NULL)';\n  $sql['recurring'] = '(`recurrence_id` IS NULL)';\n  return $sql;\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image alignright\"><a href=\"\/wp-content\/uploads\/events_manager_for_wordpress_example.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/events_manager_for_wordpress_example-395x1024.jpg\" alt=\"\" class=\"wp-image-9701\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the end, the resulting code was quite easy to write and leaves our development team desiring more event calendars in future migrations!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At WordHerd we migrate a large volume of websites on a regular basis and in doing so, we often come across the need for an Events Calendar. We&#8217;ve used many over the years, but have really settled on Events Manager for WordPress because, unlike others we&#8217;ve tried, it is very reliable and never lets us [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":13992,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[663,15],"tags":[665,595],"builders":[],"industry":[],"platform":[],"class_list":["post-9699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","category-wordpress","tag-wordpress-filters","tag-wordpress-tutorial"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration<\/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:\/\/wordherd.io\/de\/blog\/filter-recurring-events-from-event-manager-listings\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration\" \/>\n<meta property=\"og:description\" content=\"At WordHerd we migrate a large volume of websites on a regular basis and in doing so, we often come across the need for an Events Calendar. We&#8217;ve used many over the years, but have really settled on Events Manager for WordPress because, unlike others we&#8217;ve tried, it is very reliable and never lets us [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wordherd.io\/de\/blog\/filter-recurring-events-from-event-manager-listings\/\" \/>\n<meta property=\"og:site_name\" content=\"WordHerd WordPress Migration\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/wordherdio\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-19T05:36:33+00:00\" \/>\n<meta name=\"author\" content=\"WordHerd\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wordherdio\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"WordHerd\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/\"},\"author\":{\"name\":\"WordHerd\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\"},\"headline\":\"Filter Recurring Events from Event Manager for WordPress Listings\",\"datePublished\":\"2019-12-19T05:36:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/\"},\"wordCount\":202,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/events_manager_for_wordpress_wordherd-1.jpg\",\"keywords\":[\"wordpress filters\",\"wordpress tutorial\"],\"articleSection\":[\"Tutorial\",\"WordPress\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/\",\"name\":\"Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/events_manager_for_wordpress_wordherd-1.jpg\",\"datePublished\":\"2019-12-19T05:36:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/events_manager_for_wordpress_wordherd-1.jpg\",\"contentUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/events_manager_for_wordpress_wordherd-1.jpg\",\"width\":1500,\"height\":880,\"caption\":\"Filtering results in the Events Manager for WordPress plugin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/filter-recurring-events-from-event-manager-listings\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wordherd.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Filter Recurring Events from Event Manager for WordPress Listings\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"name\":\"WordHerd WordPress Migration\",\"description\":\"Website Migration Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wordherd.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\",\"name\":\"WordHerd WordPress Migration\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"contentUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"width\":1000,\"height\":315,\"caption\":\"WordHerd WordPress Migration\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\",\"name\":\"WordHerd\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"caption\":\"WordHerd\"},\"sameAs\":[\"https:\\\/\\\/wordherd.io\",\"https:\\\/\\\/www.facebook.com\\\/wordherdio\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wordherd\",\"https:\\\/\\\/x.com\\\/wordherdio\"],\"url\":\"https:\\\/\\\/wordherd.io\\\/de\\\/blog\\\/author\\\/wordherd\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration","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:\/\/wordherd.io\/de\/blog\/filter-recurring-events-from-event-manager-listings\/","og_locale":"de_DE","og_type":"article","og_title":"Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration","og_description":"At WordHerd we migrate a large volume of websites on a regular basis and in doing so, we often come across the need for an Events Calendar. We&#8217;ve used many over the years, but have really settled on Events Manager for WordPress because, unlike others we&#8217;ve tried, it is very reliable and never lets us [&hellip;]","og_url":"https:\/\/wordherd.io\/de\/blog\/filter-recurring-events-from-event-manager-listings\/","og_site_name":"WordHerd WordPress Migration","article_author":"https:\/\/www.facebook.com\/wordherdio\/","article_published_time":"2019-12-19T05:36:33+00:00","author":"WordHerd","twitter_card":"summary_large_image","twitter_creator":"@wordherdio","twitter_misc":{"Verfasst von":"WordHerd","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#article","isPartOf":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/"},"author":{"name":"WordHerd","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac"},"headline":"Filter Recurring Events from Event Manager for WordPress Listings","datePublished":"2019-12-19T05:36:33+00:00","mainEntityOfPage":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/"},"wordCount":202,"commentCount":0,"publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"image":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#primaryimage"},"thumbnailUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/events_manager_for_wordpress_wordherd-1.jpg","keywords":["wordpress filters","wordpress tutorial"],"articleSection":["Tutorial","WordPress"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/","url":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/","name":"Filter Recurring Events from Event Manager for WordPress Listings - WordHerd WordPress Migration","isPartOf":{"@id":"https:\/\/wordherd.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#primaryimage"},"image":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#primaryimage"},"thumbnailUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/events_manager_for_wordpress_wordherd-1.jpg","datePublished":"2019-12-19T05:36:33+00:00","breadcrumb":{"@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#primaryimage","url":"https:\/\/wordherd.io\/wp-content\/uploads\/events_manager_for_wordpress_wordherd-1.jpg","contentUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/events_manager_for_wordpress_wordherd-1.jpg","width":1500,"height":880,"caption":"Filtering results in the Events Manager for WordPress plugin"},{"@type":"BreadcrumbList","@id":"https:\/\/wordherd.io\/blog\/filter-recurring-events-from-event-manager-listings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wordherd.io\/"},{"@type":"ListItem","position":2,"name":"Filter Recurring Events from Event Manager for WordPress Listings"}]},{"@type":"WebSite","@id":"https:\/\/wordherd.io\/#website","url":"https:\/\/wordherd.io\/","name":"WordHerd WordPress Migration","description":"Websitesitzungsdienstleistungen","publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wordherd.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/wordherd.io\/#organization","name":"WordHerd WordPress Migration","url":"https:\/\/wordherd.io\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/","url":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","contentUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","width":1000,"height":315,"caption":"WordHerd WordPress Migration"},"image":{"@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac","name":"WordHerd","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","caption":"WordHerd"},"sameAs":["https:\/\/wordherd.io","https:\/\/www.facebook.com\/wordherdio\/","https:\/\/www.linkedin.com\/company\/wordherd","https:\/\/x.com\/wordherdio"],"url":"https:\/\/wordherd.io\/de\/blog\/author\/wordherd\/"}]}},"_links":{"self":[{"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/posts\/9699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/comments?post=9699"}],"version-history":[{"count":0,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/posts\/9699\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/media\/13992"}],"wp:attachment":[{"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/media?parent=9699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/categories?post=9699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/tags?post=9699"},{"taxonomy":"builders","embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/builders?post=9699"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/industry?post=9699"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/wordherd.io\/de\/wp-json\/wp\/v2\/platform?post=9699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}