Gutenberg: Block Based Themes: Indicate which Block Template will be used

Created on 15 Feb 2020  路  5Comments  路  Source: WordPress/gutenberg

The Problem
With Block Based Themes and Block Templates, when creating/editing a post, you have to jump through a few hoops to discover which Block Template will be used when it gets displayed, which could get tedious, and result in user confusion.

For a blog titled Hello World, these are the current steps required to discover which Block Template will be used:

  1. First, you'll need to have an understanding of Block Template hierarchy
  2. In wp-admin, navigate to the Appearance > Templates page and search for the slug which matches the post in question. Search for the word "single", and analyze the results to see if any would match your post:

    • single-post-hello-world

    • single-post

    • single

  3. If none match there, you have to navigate to the theme's source files and do the same check, first looking for matching html files.

    • single-post-hello-world.html

    • single-post.html

    • single.html

  4. If none match there, you have to start looking for matching PHP files

    • single-post-hello-world.php

    • single-post.php

    • single.php

While this process of hunting for the right source file isn't new to theme developers, it will be new to users, who now have the ability to create Block Templates.

To me, this process feels like a bit of a wild-goose-chase 馃, especially when it's information we can easily provide!

Describe the solution you'd like
When editing a post, I would like to see an indication of which Block Template will be used as the source. Here's a mockup of a possible solution:

Screen Shot 2020-02-14 at 6 17 16 PM

While that mockup is one approach, I can already see it leading to questions from the user, wondering why they can't just change the template. So perhaps it's better living outside a "settings" area, like in the admin bar.

Screen Shot 2020-02-14 at 6 19 53 PM

Regardless of where it might ultimately fit best, I think this could be a huge time-and-confusion-saver which helps users discover why their posts/pages look the way they do.

Needs Design Feedback [Feature] Full Site Editing

Most helpful comment

Thanks for opening this, it's a must-have!

All 5 comments

Thanks for opening this, it's a must-have!

Another mockup idea is to do something similar to the "Permalink" section in the Document sidebar:

Screen Shot 2020-02-17 at 5 12 56 PM

With fullscreen mode becoming the default, I think moving away from using the wp-admin bar for this is a good idea.

It would be very helpful to have the post/page template name and link just below the Publish link.

Just n'thing this; I was about to report this today because I couldn't figure it out.

This is still applicable as of July 7, 2020 commit (51256763abb2f54fa66ebfa7b6e1e5efb6eb5210)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maddisondesigns picture maddisondesigns  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments

jasmussen picture jasmussen  路  3Comments

spocke picture spocke  路  3Comments

youknowriad picture youknowriad  路  3Comments