Title: Test your Theme for Gutenberg
Last modified: July 22, 2018

---

# Test your Theme for Gutenberg

 *  Resolved [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/)
 * Here is an interesting link for testing your theme for Gutenberg: [How to Test our Theme for Gutenberg](https://wp4good.org/how-to-test-our-theme-for-gutenberg/).
 * This post points to a text file which contains the code which would be generated
   in your posts or pages for all of the currently available blocks. By adding this
   file to your post/page (toggle to Code Editor option to do this), you can test
   out usage of code for all of the current Gutenberg blocks. This is one way to
   check out whether your theme is set up correctly for displaying Gutenberg blocks.
 * Al

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Birgit Pauli-Haack](https://wordpress.org/support/users/bph/)
 * (@bph)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10467544)
 * Hi [@almcr](https://wordpress.org/support/users/almcr/) Thanks for the shout-
   out, regarding Testing a Theme for Gutenberg. There is an alternative approach
   available. A couple of days after I published the above article Rich Tabor came
   out with a nice [plugin called Block Unit Test ](https://wordpress.org/plugins/block-unit-test/).
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10467783)
 * I did see that plugin. I downloaded it, activated it and have not figured out
   how to make it work yet. Rich states that it should create a Block Unit Test 
   page, not for me, not sure why. Now I am using an old XP system with out-dated
   level of Chrome, perhaps that is why. Still working on that.
 * Al
 *  [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10509877)
 * Hi Al,
 * Have installed the plugin few moments ago. It did create a page (draft) with 
   all the Gutenberg test content. Nice!
 * I’m using a simple basic theme with a basic stylesheet and I notice Gutenberg
   itself provides most of the custom styling (CSS). So the Gutenberg test page 
   looks just fine on my test site. I thought theme developers had to make lots 
   of CSS changes to support Gutenberg, but it seems that Gutenberg itself already
   provides most of it.
 * Guido
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10512713)
 * that’s good Guido. I have no doubt that the plugin works, it is just that it 
   does not work for me on my computer. I do not know why and have been trying to
   figure out why since I first installed the plugin. I tried it again not five 
   minutes ago. I am using an old XP system with XAMPP, running php 5.3.5, wordpress
   4.9.7.
 * I looked at the code in the plugin and have extracted the code that the plugin
   generates and have put that into a page and have displayed the output. All of
   that works fine, it is just that no page is generated when I activate the plugin.
   The only way for me to get content out of the plugin is to copy and paste it.
 * still searching for an answer
 * Al
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10515036)
 * if I put this code into the plugin’s class-block-unit-test.php file at line 31
 * //output some debug string
    error_log( ‘executing Block Unit Test code’ );
 * then turning on debug mode does show that the plugin code is being executed, 
   is there any way to show the ‘content’ of the page that is supposed to be created
   for me? which php line code creates the actual page to be created? is there any
   way for me to check that that code is being executed and why the page data is
   not being created correctly for me?
 * still trying to figure out why this plugin is not working for me, and it does
   work for other users
 * Al
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10515389)
 * found the problem with the plugin??.
 * I discovered that, when I initially set out to test this plugin, I created a 
   page called Block Unit Test but in reading the documentation more carefully realized
   that the plugin creates the page, not I. So I deleted it and it went into Trash.
   Subsequent tests of the plugin still did not work, so finally today I deleted
   the page previously created that was in Trash. Then the plugin worked and creates
   the Block Unit Test page as expected.
 * Logic in the plugin bypasses creation of the page if already present, I guess
   I assumed that if the page was in Trash that the already being present condition
   would not be met, bad assumption.
 * Al
 *  [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10515675)
 * Yes, no page is created when it’s already present.
    Checked file `class-block-
   unit-test` and found this:
 *     ```
       // Do not create the post if it's already present.
       if ( post_exists( $title ) ) {
       	return;
       }
       ```
   
 * 🙂
 * Guido
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10515711)
 * Guido,
 * That is true,
    I guess I did not expect that a page in Trash would meet that 
   condition. Assumptions get you every time.
 * Al
 *  Moderator [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * (@clorith)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10516542)
 * This topic has turned to discussing a whole other plugin, as such I’ll be closing
   it at this time.
 * If you are looking for further help with the above mentioned plugin, please use
   their support forums at [https://wordpress.org/support/plugin/block-unit-test/](https://wordpress.org/support/plugin/block-unit-test/)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Test your Theme for Gutenberg’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/test-your-theme-for-gutenberg/#post-10516542)
 * Status: resolved