4

When using the block editor, Is there a way to move the post title out of the block editor interface? The way it appears above the blocks and cannot be moved around like other blocks implies that it will be displayed above the block content, but in all of my front-end templates, the title is displayed elsewhere. I’m building sites for clients, and don’t want them to have to imagine a page layout that is so different from what’s in the back end.

Ideally, I’d like to have the title in it’s own row above the block editor interface, or in the sidebar in the Document panel.

Part 2 of my question is more philosophical. Why is the title inside the block editor interface at all? Why isn’t it rendered as part of the_content() if it’s within the same container as the rest of The Content? Am I missing something conceptual here, as to why it’s set up this way?

1
  • this usually isn't a problem if you've built a block theme as the site and template editors make it super clear where the title will actually be. Also the title is not the content and vice versa
    – Tom J Nowell
    Commented Jul 28, 2023 at 17:11

1 Answer 1

1

When using the block editor, Is there a way to move the post title out of the block editor interface?

No, but you could hide it with CSS and put a post title box in the post sidebar. You could even override its edit component with a blank component. But this would be problematic and not the UX improvement you're hoping it to be, especially on block themes and custom templates.

Ideally, I’d like to have the title in it’s own row above the block editor interface

It's already in its own row above the block editor interface.

enter image description here

If you inspect the editor, the title has its own separate container above the block content. The fact that it's implemented by a block is mainly to simplify things since there is a post title block that can be moved that works the same way, so it's reused here. Does that mean you can move it when editing a post? No, because the reason you can move it is for the same reason you've moved it, templating.

In fact you can insert a post title block anywhere in the page to get multiple instances of the post title:

enter image description here

Fundamentally, it looks like you're unfamiliar with block themes and the site editor. If you were, you'd have seen the site editor showing the full template, complete with your content with titles in the places you expect to see them on the frontend, not at the very top.

When editing a post, you're not editing it how it looks on the frontend when viewed with the entire template, you're just editing the content specific to that post. The title is at the top because the title has always been at the top going back to the very first release of WordPress, and it's where titles usually appear in documents.

If you open it in the site editor in newer versions of WordPress though, you can edit posts in place. Post title blocks become editable, as do the insides of post content blocks.

Part 2 of my question is more philosophical. Why is the title inside the block editor interface at all? Why isn’t it rendered as part of the_content() if it’s within the same container as the rest of The Content? Am I missing something conceptual here, as to why it’s set up this way?

Some important things:

  1. the entire screen is the block editor, not just the block list
  2. the title is not the first block in the block list, it is above it and separate.
  3. the title and block list aren't the only things that appear in the editable region, metaboxes, toasts, and notice bars appear there too
  4. Post titles are not post content, they have their own APIs, their own database fields, etc etc if post titles got displayed in the_content it would be the biggest backwards compatibility break in the history of the project, and make many types of websites completely impossible to implement.
  5. It is not a part of the same container.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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