How To

Prepare a Theme for TukuToi Gutenberg Layouts

Using the TukuToi Gutenberg Layouts Plugin you can design entire Template Layouts in the WordPress Backend.

To render them, you don’t need a costly and very complicated WordPress Theme. You just need a minimal WordPress theme holding a style.css file, a header.php and footer.php file, plus an index.php and 404.php template. These templates can be very minimal like shown below.

Important is the specific method to render TukuToi Gutenberg Layouts, which must be inserted just after the respective get_header() calls in the templates.

To create a Theme or adapt a Theme to render TukuToi Gutenberg Layouts, you’ll barely need 15 minutes.

Let’s start

  1. style.css – Should be created as defined by WordPress Codex

  2. header.php – Should be created as defined by WordPress Codex, but only until and inclusive the body_class() tag!
    A great example can be seen here

  3. footer.php – Should be created as defined by WordPress Codex, but you will not include any markup unless closing body and html tag, which are inserted just after wp_footer()

  4. index.php,404.php – Should not be created as defined by WordPress Codex. You should include only 3 lines of code in the index.php or any other template like 404.php:

    get_header( ); //include header.php
        echo tkt_the_template($template_id);//Render our TukuToi Blocks Template 
    get_footer( ); //include footer.php

That’s it, the theme is now ready for TukuToi Blocks Templates full site editing features.