{"id":2327,"date":"2021-07-17T17:22:58","date_gmt":"2021-07-17T09:22:58","guid":{"rendered":"https:\/\/www.intelliwolf.com\/?p=2327"},"modified":"2022-04-11T14:08:01","modified_gmt":"2022-04-11T06:08:01","slug":"full-width-divi-template-for-gutenberg","status":"publish","type":"post","link":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/full-width-divi-template-for-gutenberg\/","title":{"rendered":"How To Make A Full Width Divi Template For Gutenberg"},"content":{"rendered":"\n

Sometimes we want to use the Gutenberg editor for some of the simpler pages on a Divi<\/a> site.<\/p>\n\n\n\n

I know, there are better ways, like using GeneratePress<\/a> or Astra<\/a> with Elementor<\/a> or Beaver Builder<\/a>. Those are my usual combinations when I know I'll be building out a bunch of Gutenberg pages.<\/p>\n\n\n\n

But sometimes, you just need to work with what the client's familiar with.<\/p>\n\n\n\n

To make a full width Divi template for the Gutenberg editor<\/strong>:<\/p>\n\n\n\n

  1. Create a new file<\/a> in your child theme called template-full-width.php<\/em><\/li>
  2. Copy the code<\/a> from Divi's page-template-blank.php<\/em> into the new template file<\/li>
  3. Change the template name<\/a> to \"Full Width Page\"<\/li>
  4. Remove<\/a> <div class=\"container\"><\/em> and the matching closing tag<\/li>
  5. Use the new template<\/a> by choosing \"Full Width Page\" and \"No Sidebar\" when you create a new page<\/li><\/ol>\n\n\n\n

    There's a lot there, so let's go through the steps in detail.<\/p>\n\n\n\n

    What result are we trying to achieve?<\/h2>\n\n\n\n

    When you create a new page with Divi, you get a page that looks like this:<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    The widths are constrained and there's no mechanism for making it go full width.<\/p>\n\n\n\n

    As I covered in another post, you can make Divi sections go full width<\/a>. Unfortunately there's a conditional in the templates that prevents pages built with Gutenberg (or the Classic editor) from going full width.<\/p>\n\n\n\n

    We will end up with pages built with Gutenberg stretching the full width of the screen, like in the image below.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    Create a new file in your child theme<\/h2>\n\n\n\n

    If you aren't using a child theme, now is the time to do so. I've done a guide on on creating a child theme<\/a>, which you should read first.<\/p>\n\n\n\n

    Add a new page, either before you upload the child theme, or via FTP.<\/p>\n\n\n\n

    You can call it whatever makes sense, but in this case we're going to call it template-full-width.php<\/em>.<\/p>\n\n\n\n

    Copy the code from the Blank template<\/h2>\n\n\n\n

    You can copy the code through FTP or in your copy of Divi on your computer.<\/p>\n\n\n\n

    However the easiest way is likely to be by going to the Theme Editor in WordPress, choosing Divi and going to page-template-blank.php<\/em>.<\/p>\n\n\n\n

    Copy all of the code in the editor.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    Paste the code into template-full-width.php<\/em>.<\/p>\n\n\n\n

    Be sure to include the opening <?php tag.<\/p>\n\n\n\n

    Save your template.<\/p>\n\n\n\n

    Change the template name<\/h2>\n\n\n\n

    At the top of the template-full-width.php<\/em>, you'll find the template name.<\/p>\n\n\n\n

    Change this to Full Width Page<\/em>, or something that makes sense to your workflow.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    Remove the container Div<\/h2>\n\n\n\n

    In Divi, the content width is set with <div class=\"container\"><\/em>.<\/p>\n\n\n\n

    Find this line in the top of your template and delete it.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    Then look at the bottom of your template for the line reading <\/div> <!-- .container --><\/em> and delete that.<\/p>\n\n\n\n

    The <!-- .container --><\/em> is a HTML comment that lets you know which Div it belongs to.<\/p>\n\n\n\n

    We want to make sure if we delete an opening Div, we delete the corresponding closing Div. Otherwise it will wreck your layout.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    How to use your new template<\/h2>\n\n\n\n

    Add a new page, choosing \"Use Default Editor\".<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    On the right sidebar, look for \"Page Attributes\".<\/p>\n\n\n\n

    From the Template dropdown, select \"Full Width Page\", or whatever you called your new template.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    We also need to remove the sidebar, or Divi will leave in padding.<\/p>\n\n\n\n

    Yes, even if you delete get_sidebar();<\/em> from the template.<\/p>\n\n\n\n

    Under Divi Page Settings, from the Page Layout dropdown, choose \"No Sidebar\".<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    Save your page and you'll have a full width layout for Gutenberg.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    <\/p>\n","protected":false},"excerpt":{"rendered":"

    Sometimes we want to use the Gutenberg editor for some of the simpler pages on a Divi site. I know, there are better ways, like using GeneratePress or Astra with Elementor or Beaver Builder. Those are my usual combinations when I know I’ll be building out a bunch of Gutenberg pages. But sometimes, you just<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[16],"yoast_head":"\nHow To Make A Full Width Divi Template For Gutenberg<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Make A Full Width Divi Template For Gutenberg\" \/>\n<meta property=\"og:description\" content=\"Sometimes we want to use the Gutenberg editor for some of the simpler pages on a Divi site. I know, there are better ways, like using GeneratePress or Astra with Elementor or Beaver Builder. Those are my usual combinations when I know I'll be building out a bunch of Gutenberg pages. But sometimes, you just\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\" \/>\n<meta property=\"og:site_name\" content=\"Intelliwolf\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-17T09:22:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-11T06:08:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png\" \/>\n<meta name=\"author\" content=\"Mike Haydon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Haydon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\"},\"author\":{\"name\":\"Mike Haydon\",\"@id\":\"https:\/\/www.intelliwolf.com\/#\/schema\/person\/7209e3ff14822e4d70d5f194a310f343\"},\"headline\":\"How To Make A Full Width Divi Template For Gutenberg\",\"datePublished\":\"2021-07-17T09:22:58+00:00\",\"dateModified\":\"2022-04-11T06:08:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\"},\"wordCount\":594,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.intelliwolf.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png\",\"keywords\":[\"Divi\"],\"articleSection\":[\"Theme Customization\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\",\"url\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\",\"name\":\"How To Make A Full Width Divi Template For Gutenberg\",\"isPartOf\":{\"@id\":\"https:\/\/www.intelliwolf.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png\",\"datePublished\":\"2021-07-17T09:22:58+00:00\",\"dateModified\":\"2022-04-11T06:08:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage\",\"url\":\"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01.png\",\"contentUrl\":\"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01.png\",\"width\":1504,\"height\":532},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.intelliwolf.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Theme Customization\",\"item\":\"https:\/\/www.intelliwolf.com\/category\/theme-customization\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Make A Full Width Divi Template For Gutenberg\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.intelliwolf.com\/#website\",\"url\":\"https:\/\/www.intelliwolf.com\/\",\"name\":\"Intelliwolf\",\"description\":\"WordPress, Web Design and Coding Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.intelliwolf.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.intelliwolf.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.intelliwolf.com\/#organization\",\"name\":\"Intelliwolf\",\"url\":\"https:\/\/www.intelliwolf.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.intelliwolf.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/intelliwolf-logo-300t.png\",\"contentUrl\":\"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/intelliwolf-logo-300t.png\",\"width\":300,\"height\":100,\"caption\":\"Intelliwolf\"},\"image\":{\"@id\":\"https:\/\/www.intelliwolf.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.intelliwolf.com\/#\/schema\/person\/7209e3ff14822e4d70d5f194a310f343\",\"name\":\"Mike Haydon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.intelliwolf.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d5f4754fae310a04dede91d15e57c8a0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d5f4754fae310a04dede91d15e57c8a0?s=96&d=mm&r=g\",\"caption\":\"Mike Haydon\"},\"sameAs\":[\"https:\/\/intelliwolf.com\/about-mike-haydon\/\"]}]}<\/script>\n","yoast_head_json":{"title":"How To Make A Full Width Divi Template For Gutenberg","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:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/","og_locale":"en_US","og_type":"article","og_title":"How To Make A Full Width Divi Template For Gutenberg","og_description":"Sometimes we want to use the Gutenberg editor for some of the simpler pages on a Divi site. I know, there are better ways, like using GeneratePress or Astra with Elementor or Beaver Builder. Those are my usual combinations when I know I'll be building out a bunch of Gutenberg pages. But sometimes, you just","og_url":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/","og_site_name":"Intelliwolf","article_published_time":"2021-07-17T09:22:58+00:00","article_modified_time":"2022-04-11T06:08:01+00:00","og_image":[{"url":"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png"}],"author":"Mike Haydon","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mike Haydon","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#article","isPartOf":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/"},"author":{"name":"Mike Haydon","@id":"https:\/\/www.intelliwolf.com\/#\/schema\/person\/7209e3ff14822e4d70d5f194a310f343"},"headline":"How To Make A Full Width Divi Template For Gutenberg","datePublished":"2021-07-17T09:22:58+00:00","dateModified":"2022-04-11T06:08:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/"},"wordCount":594,"commentCount":1,"publisher":{"@id":"https:\/\/www.intelliwolf.com\/#organization"},"image":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage"},"thumbnailUrl":"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png","keywords":["Divi"],"articleSection":["Theme Customization"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/","url":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/","name":"How To Make A Full Width Divi Template For Gutenberg","isPartOf":{"@id":"https:\/\/www.intelliwolf.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage"},"image":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage"},"thumbnailUrl":"https:\/\/intelliwolf.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01-600x212.png","datePublished":"2021-07-17T09:22:58+00:00","dateModified":"2022-04-11T06:08:01+00:00","breadcrumb":{"@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#primaryimage","url":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01.png","contentUrl":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/2021\/07\/2021-07-17-divi-full-width-gutenberg-01.png","width":1504,"height":532},{"@type":"BreadcrumbList","@id":"https:\/\/www.intelliwolf.com\/full-width-divi-template-for-gutenberg\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.intelliwolf.com\/"},{"@type":"ListItem","position":2,"name":"Theme Customization","item":"https:\/\/www.intelliwolf.com\/category\/theme-customization\/"},{"@type":"ListItem","position":3,"name":"How To Make A Full Width Divi Template For Gutenberg"}]},{"@type":"WebSite","@id":"https:\/\/www.intelliwolf.com\/#website","url":"https:\/\/www.intelliwolf.com\/","name":"Intelliwolf","description":"WordPress, Web Design and Coding Tutorials","publisher":{"@id":"https:\/\/www.intelliwolf.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.intelliwolf.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.intelliwolf.com\/#organization","name":"Intelliwolf","url":"https:\/\/www.intelliwolf.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.intelliwolf.com\/#\/schema\/logo\/image\/","url":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/intelliwolf-logo-300t.png","contentUrl":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-content\/uploads\/intelliwolf-logo-300t.png","width":300,"height":100,"caption":"Intelliwolf"},"image":{"@id":"https:\/\/www.intelliwolf.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.intelliwolf.com\/#\/schema\/person\/7209e3ff14822e4d70d5f194a310f343","name":"Mike Haydon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.intelliwolf.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d5f4754fae310a04dede91d15e57c8a0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d5f4754fae310a04dede91d15e57c8a0?s=96&d=mm&r=g","caption":"Mike Haydon"},"sameAs":["https:\/\/intelliwolf.com\/about-mike-haydon\/"]}]}},"_links":{"self":[{"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/posts\/2327"}],"collection":[{"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/comments?post=2327"}],"version-history":[{"count":2,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/posts\/2327\/revisions"}],"predecessor-version":[{"id":2340,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/posts\/2327\/revisions\/2340"}],"wp:attachment":[{"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/media?parent=2327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/categories?post=2327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress-757293-2559390.cloudwaysapps.com\/wp-json\/wp\/v2\/tags?post=2327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}