{"id":44728,"date":"2019-09-08T08:20:52","date_gmt":"2019-09-07T22:20:52","guid":{"rendered":"https:\/\/getblocklab.com\/?post_type=docs&#038;p=44728"},"modified":"2021-07-28T13:36:42","modified_gmt":"2021-07-28T13:36:42","slug":"reset_block_rows","status":"publish","type":"page","link":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/","title":{"rendered":"reset_block_rows()"},"content":{"rendered":"\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>Description<\/strong><\/p>\n\n\n\n<p>Resets the repeater block rows after the <code>while<\/code> loop in a way that is similar to <code>wp_reset_postdata()<\/code>. Call this after the repeater loop. This allows for multiple repeater loops to be used in a single template.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reset_block_rows( $name );<\/code><\/pre>\n\n\n\n<p class=\"has-normal-font-size\"><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>$name <em>(string)(Required)<\/em> The repeater field name<\/li><\/ul>\n\n\n\n<p class=\"has-large-font-size\"><strong>Usage<\/strong><\/p>\n\n\n\n<p>In this example, reset the repeater block rows after calling the repeater field and its sub-fields. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while ( block_rows( 'example-repeater-field' ) ) :\n &nbsp;block_row( 'example-repeater-field' );\n &nbsp;block_sub_field( 'example-repeater-subfield' );\nendwhile;\nreset_block_rows( 'example-repeater-field' );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Description Resets the repeater block rows after the while loop in a way that is similar to wp_reset_postdata(). Call this after the repeater loop. This allows for multiple repeater loops to be used in a single template. Parameters $name (string)(Required) The repeater field name Usage In this example, reset the repeater block rows after calling [&hellip;]<\/p>\n","protected":false},"author":447,"featured_media":0,"parent":17396,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"class_list":{"0":"post-44728","1":"page","2":"type-page","3":"status-publish","5":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>reset_block_rows() - Genesis Custom Blocks<\/title>\n<meta name=\"description\" content=\"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"reset_block_rows() - Genesis Custom Blocks\" \/>\n<meta property=\"og:description\" content=\"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/\" \/>\n<meta property=\"og:site_name\" content=\"Genesis Custom Blocks\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-28T13:36:42+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/#website\",\"url\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/\",\"name\":\"Genesis Custom Blocks\",\"description\":\"Create effective content faster.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#webpage\",\"url\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/\",\"name\":\"reset_block_rows() - Genesis Custom Blocks\",\"isPartOf\":{\"@id\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/#website\"},\"datePublished\":\"2019-09-07T22:20:52+00:00\",\"dateModified\":\"2021-07-28T13:36:42+00:00\",\"description\":\"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Functions\",\"item\":\"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"reset_block_rows()\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"reset_block_rows() - Genesis Custom Blocks","description":"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.","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:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/","og_locale":"en_US","og_type":"article","og_title":"reset_block_rows() - Genesis Custom Blocks","og_description":"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.","og_url":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/","og_site_name":"Genesis Custom Blocks","article_modified_time":"2021-07-28T13:36:42+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/#website","url":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/","name":"Genesis Custom Blocks","description":"Create effective content faster.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#webpage","url":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/","name":"reset_block_rows() - Genesis Custom Blocks","isPartOf":{"@id":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/#website"},"datePublished":"2019-09-07T22:20:52+00:00","dateModified":"2021-07-28T13:36:42+00:00","description":"Use the reset_block_rows function with your custom Gutenberg blocks using the Block Lab WordPress plugin.","breadcrumb":{"@id":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/reset_block_rows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/"},{"@type":"ListItem","position":2,"name":"Functions","item":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/functions\/"},{"@type":"ListItem","position":3,"name":"reset_block_rows()"}]}]}},"featured_image_src":null,"featured_image_src_square":null,"_links":{"self":[{"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/pages\/44728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/users\/447"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/comments?post=44728"}],"version-history":[{"count":0,"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/pages\/44728\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/pages\/17396"}],"wp:attachment":[{"href":"https:\/\/developer.wpengine.com\/genesis-custom-blocks\/wp-json\/wp\/v2\/media?parent=44728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}