{"id":13168565,"date":"2020-07-25T09:55:34","date_gmt":"2020-07-25T09:55:34","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-row-template-again\/"},"modified":"2020-07-25T09:55:34","modified_gmt":"2020-07-25T09:55:34","slug":"custom-row-template-again","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-row-template-again\/","title":{"rendered":"Custom row template, again"},"content":{"rendered":"<p>Hello. <\/p>\n<p>I have read the other posts on this topic thoroughly but i cannot get my head around what i need where, sorry to ask again but i am really, really stuck: <\/p>\n<p>I have this in my functions.php: <\/p>\n<pre><code>\tfunction my_block_editor_assets() {\n\t\twp_enqueue_script(\n\t\t\t&#039;my-block-editor-js&#039;,\n\t\t\tget_stylesheet_directory_uri() . &#039;.\/block-editor\/block-filter.js&#039;,\n\t\t\tarray( &#039;wp-hooks&#039; ),\n\t\t\t&#039;1.0.0&#039;,\n\t\t\ttrue \/\/ Enqueue the script in the footer.\n\t\t);\n\t}\n\tadd_action( &#039;enqueue_block_editor_assets&#039;, &#039;my_block_editor_assets&#039; );<\/code><\/pre>\n<p>The file &#8216;block-filter.js&#8217; resides in &#8216;themename\/block-editor\/block-filter.js&#8217; (so the folder &#8216;block-editor&#8217; and my functions.php are on the same level). <\/p>\n<p>The content of this file is: <\/p>\n<pre><code>function myRowTemplates(templates) {\n\n\t\ttemplates.push( {\n\n\t\t\tname: &#039;1-1-1-1&#039;,\n\t\t\ttitle: &#039;4 Columns&#039;,\n\t\t\ticon: &#039;layout&#039;,\n\t\t\ttemplateLock: &#039;all&#039;,\n\t\t\ttemplate: [\n\n\t\t\t\t[\n\t\t\t\t\t&#039;wp-bootstrap-blocks\/column&#039;,\n\t\t\t\t\t{\n\t\t\t\t\t\tsizeLg: 3,\n\t\t\t\t\t\tsizeMd: 6\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t&#039;wp-bootstrap-blocks\/column&#039;,\n\t\t\t\t\t{\n\t\t\t\t\t\tsizeLg: 3,\n\t\t\t\t\t\tsizeMd: 6\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t&#039;wp-bootstrap-blocks\/column&#039;,\n\t\t\t\t\t{\n\t\t\t\t\t\tsizeLg: 3,\n\t\t\t\t\t\tsizeMd: 6\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t&#039;wp-bootstrap-blocks\/column&#039;,\n\t\t\t\t\t{\n\t\t\t\t\t\tsizeLg: 3,\n\t\t\t\t\t\tsizeMd: 6\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t]\n\t\t});\n\n\t\treturn templates;\n\t}\n\n\twp.hooks.addFilter(&#039;wpBootstrapBlocks.row.templates&#039;, &#039;themename\/wp-bootstrap-blocks\/row\/templates&#039;, myRowTemplates);<\/code><\/pre>\n<p>Do i need anything else?<br \/>\nSomehow it seems i also need a file in &#8216;themename\/wp-bootstrap-blocks\/row\/template&#8217; so i tried to copy the file from the extension into that place, so in there i have the file &#8216;row.php&#8217; with its original content. <\/p>\n<p>I am completely stuck, like sitting in front of a wall i&#8217;d like to look through but can not. <\/p>\n<p>Any help is definitely welcome and appreciated.<br \/>\nWill try to get along but please, if you have an idea what i&#8217;m missing, please tell me \ud83d\ude42<\/p>\n<p>Thank you so much, cheers, Frank<\/p>\n","protected":false},"template":"","class_list":["post-13168565","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13168565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13168565\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13168565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}