{"id":4908,"date":"2020-06-03T12:04:36","date_gmt":"2020-06-03T12:04:36","guid":{"rendered":"https:\/\/the7kennisbank.nl\/?p=4908"},"modified":"2020-06-09T13:22:24","modified_gmt":"2020-06-09T13:22:24","slug":"filter-layout-wrapper-tag","status":"publish","type":"post","link":"https:\/\/the7kennisbank.nl\/en\/wp-grid-builder\/filter-layout-wrapper-tag\/","title":{"rendered":"Filter layout wrapper tag"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element \" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<div>\n<div class=\"container flex items-center justify-between\">\n<h1 class=\"entry-title\">\/layout\/wrapper_tag<\/h1>\n<\/div>\n<\/div>\n<div id=\"article-wrapper\" class=\"container\">\n<p>This filter is called before the opening and closing HTML tag of the main wrapper (which may holds facets and grid items). It is used for grids or templates (see<code><a href=\"https:\/\/docs.wpgridbuilder.com\/resources\/function-wpgb-render-template\">wpgb_render_template()<\/a><\/code><\/p>\n<p>It allows to modifies tag name of the main layout wrapper which can holds facets and grid items. By default the tag name is <code>div<\/code>. Depending of your needs and page structure you may need, for example, to change it to a <code>section<\/code><\/p>\n<table class=\"wp-block-table arguments-table\">\n<tbody>\n<tr>\n<td>Argument<\/td>\n<td>Type<\/td>\n<td>Description<\/td>\n<\/tr>\n<tr>\n<td>$tag<\/td>\n<td>string<\/td>\n<td>Tag name used for the layout wrapper (<code>div<\/code> by default)<\/td>\n<\/tr>\n<tr>\n<td>$settings<\/td>\n<td>object<\/td>\n<td>Holds grid settings<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"code-syntax-block code-syntax-wrapper\">\n<p>[pastacode lang=&#8221;php&#8221; manual=&#8221;function%20prefix_layout_tagname(%20%24tag%2C%20%24settings%20)%20%7B%0A%0A%09%2F%2F%20If%20it%20matches%20grid%20ID%201%20(or%20a%20template%20name%20for%20example).%20%0A%09if%20(%201%20%3D%3D%3D%20%24settings-%3Eid%20)%20%7B%20%0A%09%09%24tag%20%3D%20&#8217;section&#8217;%3B%20%0A%09%7D%20%0A%0A%09return%20%24tag%20%3B%0A%0A%7D%0A%0Aadd_filter(%20&#8217;wp_grid_builder%2Flayout%2Fwrapper_tag&#8217;%2C%20&#8217;prefix_layout_tagname&#8217;%2C%2010%2C%202%20)%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p>\n<\/div>\n<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\/layout\/wrapper_tag This filter is called before the opening and closing HTML tag of the main wrapper (which may holds facets and grid items). It is used for grids or templates (seewpgb_render_template() It allows to modifies tag name of the main layout wrapper which can holds facets and grid items. By default the tag name is&hellip;<\/p>\n","protected":false},"author":2,"featured_media":4996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[44,57,43],"tags":[],"class_list":["post-4908","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-php-filters","category-wp-grid-builder","category-44","category-57","category-43","description-off"],"acf":[],"_links":{"self":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/comments?post=4908"}],"version-history":[{"count":3,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4908\/revisions"}],"predecessor-version":[{"id":5073,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4908\/revisions\/5073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media\/4996"}],"wp:attachment":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media?parent=4908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/categories?post=4908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/tags?post=4908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}