I want to change the default template for my pages to a template called fullwidthpage.php.

I have seen this question posted and answered for pre-Gutenberg Wordpress, but I have not found a working answer for Gutenberg Wordpress (version 5.3.2 at the time of this question).

This is the non-working answer I found. When I try the non-working answer the template is set to fullwidthpage.php but when I try to update the page I get a message that says "Updating failed."


I was looking for the same thing. This Answer by SkyShab did the trick. Posted below for convenience.

wp.data.dispatch('core/editor').editPost( {template: "template-name.php"} )


On the right hand side of your editor, at the top there are two tabs: Document and Block, click on document and go down until you see Page Attributes there is a slide down menu there where you can choose your template. See image attached: enter image description here

  • This changes the template for the current page but it doesn't change the default template, meaning fullwidthpage is not selected by default when a new page is created.
    – glass duo
    Apr 15 '20 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.