{"id":1952570,"date":"2022-04-28T07:13:21","date_gmt":"2022-04-28T11:13:21","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1952570"},"modified":"2025-03-05T11:31:30","modified_gmt":"2025-03-05T16:31:30","slug":"merging-duplicate-venues-and-organizers","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/merging-duplicate-venues-and-organizers\/","title":{"rendered":"Merging Duplicate Venues and Organizers"},"content":{"rendered":"\n<p>Merging duplicate venues and organizers is a great way to ensure that your data hasn&#8217;t been repeated on your WordPress site. You can find this setting under <strong>Events Setting > General<\/strong> <strong>> Maintenance<\/strong>. This scenario may come up when managing user-submitted events with <a href=\"https:\/\/theeventscalendar.com\/products\/community-events\/\" target=\"_blank\" rel=\"noreferrer noopener\">Community Events<\/a> and users submit venues and organizers as new ones multiple times.<\/p>\n\n\n\n<p>We&#8217;ve added some filters to provide you with more control over how your venues and organizers are merged.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-merging-duplicate-venues-and-organizers-with-a-filter\">Merging duplicate venues and organizers with a filter<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>tribe_merge_identical_organizers_enabled<\/code><\/li>\n\n\n\n<li><code>tribe_merge_identical_venues_enabled<\/code><\/li>\n\n\n\n<li><code>tribe_merge_identical_organizers_fields<\/code><\/li>\n\n\n\n<li><code>tribe_merge_identical_venues_fields<\/code><\/li>\n\n\n\n<li><code>tribe_amalgamate_venues_keep_venue<\/code><\/li>\n\n\n\n<li><code>tribe_amalgamate_organizers_keep_organizer<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-snippet\">Example snippet<\/h2>\n\n\n\n<p>You can use the above filters to customize the venues and organizers that are merged as duplicates. Here&#8217;s an example snippet of how to implement these filters:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_merge_identical_venues_fields&#039;, &#039;custom_merge_identical_venues_fields&#039;, 20, 1);\nfunction custom_merge_identical_venues_fields( $data ) {\n\t\/\/ Merge venues that have the same title, address, city and country.\n\t$data = &#x5B;\n\t\t&#039;title&#039;\t\t\t\t=&gt; $data&#x5B;&#039;title&#039;],\n\t\t&#039;_VenueAddress&#039;\t\t=&gt; $data&#x5B;&#039;_VenueAddress&#039;],\n\t\t&#039;_VenueCity&#039;\t\t=&gt; $data&#x5B;&#039;_VenueCity&#039;],\n\t\t&#039;_VenueCountry&#039;\t\t=&gt; $data&#x5B;&#039;_VenueCountry&#039;]\n\t];\n\n\treturn $data;\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Merging duplicate venues and organizers is a great way to ensure that your data hasn&#8217;t been repeated on your WordPress site. You can find this setting under Events Setting > General > Maintenance. This scenario may come up when managing user-submitted events with Community Events and users submit venues and organizers as new ones multiple&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_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,"ep_exclude_from_search":false,"footnotes":""},"categories":[59,97],"tags":[52,96],"stellar-product-taxonomy":[152,161],"class_list":["post-1952570","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing-resources","category-venues-organizers","tag-organizers","tag-venues","stellar-product-taxonomy-community-events","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":59,"label":"PHP &amp; Functions"},{"value":97,"label":"Venues &amp; Organizers"}],"post_tag":[{"value":52,"label":"Organizers"},{"value":96,"label":"Venues"}],"stellar-product-taxonomy":[{"value":152,"label":"Community"},{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":59,"name":"PHP &amp; Functions","slug":"customizing-resources","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":101,"filter":"raw","term_order":"0","cat_ID":59,"category_count":101,"category_description":"","cat_name":"PHP &amp; Functions","category_nicename":"customizing-resources","category_parent":24},{"term_id":97,"name":"Venues &amp; Organizers","slug":"venues-organizers","term_group":0,"term_taxonomy_id":97,"taxonomy":"category","description":"","parent":61,"count":8,"filter":"raw","term_order":"0","cat_ID":97,"category_count":8,"category_description":"","cat_name":"Venues &amp; Organizers","category_nicename":"venues-organizers","category_parent":61}],"tag_info":[{"term_id":52,"name":"Organizers","slug":"organizers","term_group":0,"term_taxonomy_id":52,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw","term_order":"0"},{"term_id":96,"name":"Venues","slug":"venues","term_group":0,"term_taxonomy_id":96,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1952570"}],"version-history":[{"count":2,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952570\/revisions"}],"predecessor-version":[{"id":1964490,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1952570\/revisions\/1964490"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1952570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1952570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1952570"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1952570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}