{"id":1967729,"date":"2025-12-01T07:30:15","date_gmt":"2025-12-01T12:30:15","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1967729"},"modified":"2025-12-01T07:53:27","modified_gmt":"2025-12-01T12:53:27","slug":"display-only-next-upcoming-recurring-event-elementor-loop-grid-widget","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/display-only-next-upcoming-recurring-event-elementor-loop-grid-widget\/","title":{"rendered":"Display Only the Next Upcoming Recurring Event In Elementor Loop Grid Widget"},"content":{"rendered":"\n<p>In Elementor, when using Loop Grid or the Loop Carousel Widget to show an event that is set to recurring, the widget show all the instances of that event.<\/p>\n\n\n\n<p>To only show the next upcoming event and to remove <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/creating-a-recurring-event-2\/\">recurring events<\/a> from the Loop Grid or the Loop Carousel Widget, the below PHP snippet is helpful:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>function hide_subsequent_recurrences($query) {<br>    $query-&gt;set(\"hide_subsequent_recurrences\", true);<br>}<br><br>add_action(\"elementor\/query\/hide_subsequent_recurrences\", \"hide_subsequent_recurrences\");<\/pre>\n\n\n\n<p>You can add the above code snippet directly to your theme\u2019s or child theme&#8217;s functions.php file. If you\u2019re not comfortable editing your theme\u2019s functions.php file, you can use the Code Snippets plugin to <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">safely add custom code<\/a> without directly modifying theme files. <\/p>\n\n\n\n<p>Here\u2019s how:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install and activate the Code Snippets plugin from the WordPress repository or directly download the plugin here:<a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">https:\/\/wordpress.org\/plugins\/code-snippets\/<\/a><\/li>\n\n\n\n<li>Go to Snippets &gt; Add New in your WordPress dashboard.<\/li>\n\n\n\n<li>Copy and paste the code snippet above into the code editor.<\/li>\n\n\n\n<li>Name your snippet (e.g., &#8220;Remove Recurring Events Loop Grid&#8221;) and click Save and Activate.<\/li>\n\n\n\n<li>Add the below to the Query ID of the widget (see screenshot).<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">hide_subsequent_recurrences<br><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"538\" height=\"1024\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID-538x1024.jpg\" alt=\"Elementor Query ID\" class=\"wp-image-1967730\" style=\"width:374px;height:auto\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID-538x1024.jpg 538w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID-158x300.jpg 158w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID-768x1462.jpg 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID-807x1536.jpg 807w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Elementor-Query-ID.jpg 895w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/figure><\/div>\n\n\n<p>That&#8217;s it! Now, only the next upcoming recurring event will display in the Elementor&#8217;s Loop Grid or Loop Carousel Widget.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Elementor, when using Loop Grid or the Loop Carousel Widget to show an event that is set to recurring, the widget show all the instances of that event. To only show the next upcoming event and to remove recurring events from the Loop Grid or the Loop Carousel Widget, the below PHP snippet is&#8230;<\/p>\n","protected":false},"author":83,"featured_media":1955565,"comment_status":"open","ping_status":"open","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":[24],"tags":[20,25,238],"stellar-product-taxonomy":[],"class_list":["post-1967729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","tag-code","tag-customizations","tag-elementor"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"}],"post_tag":[{"value":20,"label":"Code"},{"value":25,"label":"Customizations"},{"value":238,"label":"Elementor"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Rizwan Mizra","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/rizwan\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":42,"filter":"raw","term_order":"0","cat_ID":24,"category_count":42,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0}],"tag_info":[{"term_id":20,"name":"Code","slug":"code","term_group":0,"term_taxonomy_id":20,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw","term_order":"0"},{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":33,"filter":"raw","term_order":"0"},{"term_id":238,"name":"Elementor","slug":"elementor","term_group":0,"term_taxonomy_id":238,"taxonomy":"post_tag","description":"Helpful Links related to Elementor:\r\n<ul>\r\n \t<li><a href=\"https:\/\/elementor.com\/help\/\" target=\"_blank\" rel=\"noopener\"><strong>Help Center<\/strong><\/a><\/li>\r\n \t<li><a href=\"https:\/\/elementor.com\/academy\/\" target=\"_blank\" rel=\"noopener\"><strong>Tutorials &amp; Courses<\/strong><\/a><\/li>\r\n \t<li><strong><a href=\"https:\/\/developers.elementor.com\/\" target=\"_blank\" rel=\"noopener\">Developer Hub<\/a><\/strong><\/li>\r\n<\/ul>","parent":0,"count":6,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/83"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1967729"}],"version-history":[{"count":7,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967729\/revisions"}],"predecessor-version":[{"id":1967741,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967729\/revisions\/1967741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1967729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1967729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1967729"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1967729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}