Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editing: Hide page / post title #28564

Open
scruffian opened this issue Jan 28, 2021 · 33 comments
Open

Site Editing: Hide page / post title #28564

scruffian opened this issue Jan 28, 2021 · 33 comments
Labels
[Block] Post Title Affects the Post Title Block Customization Issues related to Phase 2: Customization efforts [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.

Comments

@scruffian
Copy link
Contributor

scruffian commented Jan 28, 2021

What problem does this address?

In the theme TT1, the title of the home page is hidden.

What is your proposed solution?

It would be useful to have a mechanism to hide a page title without having to fork a template

(edited)

@scruffian scruffian added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Full Site Editing [Block] Query Loop Affects the Query Loop Block labels Jan 28, 2021
@mtias
Copy link
Member

mtias commented Jan 28, 2021

That just seems to be the difference between a page template and the blog template?

@scruffian
Copy link
Contributor Author

scruffian commented Jan 28, 2021

Not exactly because we'd want all pages to have Titles except the Home page. Maybe the way to solve it is just to make an option to hide the title on any page?

@mtias
Copy link
Member

mtias commented Jan 29, 2021

The easiest way to address this currently is to just have a customize home template without a title. Hiding the title (even for posts) is something that I think we need to offer more granularly though, not requiring people to fork a template for it.

@mtias mtias added [Block] Post Title Affects the Post Title Block Customization Issues related to Phase 2: Customization efforts and removed [Block] Query Loop Affects the Query Loop Block labels Jan 29, 2021
@scruffian scruffian changed the title Site Editing: Hide Homepage title Site Editing: Hide page title Jan 29, 2021
@Sandstromer
Copy link

With full site editing, will the reading settings even be needed?

Why not just have a page template containing post-title and post-content, and then also a front-page template without the post title.
It would then be the users choice to add whatever blocks they want to the front page, e.g. Query block (or a theme pattern using the query block?) if they want to display their latest posts.

@mtias
Copy link
Member

mtias commented Jan 29, 2021

There's definitely a huge opportunity to streamline an aspect that has remained utterly confusing in WordPress for a long time. The biggest thing to reconcile as we simplify is the nature of the url structure, as it has to be clear how to go for /blog/2021/01 or /2021/01 (home directory or sub-page).

@lukecarbis
Copy link
Contributor

Would something like this work?

Screen Shot 2021-02-08 at 5 50 46 am

@scruffian
Copy link
Contributor Author

Looks good, but maybe it should go in the "Post" tab?

@lukecarbis
Copy link
Contributor

That's definitely a good idea! In this particular example, the setting would only show in the Block tab when the title was selected. So you're editing the settings for the Title block, rather than changing the page settings to hide the title.

Which approach works better?

@mtias
Copy link
Member

mtias commented Feb 11, 2021

I think on the title block is better :)

@deborah86
Copy link

I was going to suggest this. Is this idea still being considered?

@mtias
Copy link
Member

mtias commented Aug 17, 2021

Yes, definitely. Though implementation details are not fleshed out yet.

@simison
Copy link
Member

simison commented Oct 6, 2021

@mtias would the "Show title" toggle at Post tab be good intermediate solution until site-title block is used in post/page editor?

Something like this would still allow modify the title for <title> tag/SEO purposes even if it's not visible on the page canvas:

Screenshot 2021-10-06 at 11 57 02

Screenshot 2021-10-06 at 11 55 07

For permalinks there already is input:

Screenshot 2021-10-06 at 11 52 55

I agree that because these inputs would be more hidden, we'd likely see more permalinks based on IDs rather than page names but that might be fine compromise since default experience would be to show the title input at page canvas anyway.

@deborah86
Copy link

A better solution would be to make the page title part of the headings block and remove the static heading setting on every page. I don't understand why there are separate blocks for the page header and other headings. This is actually redundant. Users should be able to have multiple H1s on their page if they choose. The ability to have multiple H1s is ideal for single-page websites.

The page title should be a separate field in the side panel where people can name the pages. With the new block locking feature coming in 5.9 there really doesn't need to be a separate headings block for H1 headings.

@jordesign
Copy link
Contributor

Is this issue still relevant - with the ability to edit page templates (and remove page title) in FSE? Or do we need it still open for the purposes of TT1 ?

@lukecarbis
Copy link
Contributor

I think it's a lot less relevant given edit page templates.

@scruffian
Copy link
Contributor Author

scruffian commented May 24, 2022

Quoting @mtias above:

Hiding the title (even for posts) is something that I think we need to offer more granularly though, not requiring people to fork a template for it.

One thing to consider is that Page Title is used for the browser title tag, and for other SEO related things, so removing it from the template altogether has unintended consequences.

@deborah86
Copy link

deborah86 commented May 25, 2022

@scruffian I gave one proper solution to the issue. There should be a separate box added to the sidebar for post/page title with a checkbox for the person to use the first H1 on the page as the post/page title.

image

@draganescu
Copy link
Contributor

Related #16776

@vcanales
Copy link
Member

I'm giving this one a go, and I've already worked on the sidebar UI.
@scruffian What would be the correct place to store this setting? The first place that comes to mind is along the post data itself, but since this is an editor setting, it feels out of place.

One thing to consider is that Page Title is used for the browser title tag, and for other SEO related things, so removing it from the template altogether has unintended consequences.

I tried this template to see the effect it has on <title>, but it didn't seem to change, regardless of the template I used. Is there another way to test this?

@dashkevych
Copy link

In FSE, we can create a template with title via Post Title block.

However, it's also possible to add the title in Post Content.

It would be great to have a mechanism which automatically (no additional actions needed from the user) hides the template title if the title is also added to Post Content.

For instance, if the user adds a simple text and images to the content area then the title from template will be shown above the content.

However, if the users adds a pattern to the content area and that pattern contains Post Title block then the title from template (shown above the content) will be hidden.

@scruffian
Copy link
Contributor Author

@scruffian What would be the correct place to store this setting? The first place that comes to mind is along the post data itself, but since this is an editor setting, it feels out of place.

Is it an editor setting? It feels like a page/post setting, so storing alongside that data makes sense to me.

@davemart-in
Copy link

davemart-in commented Jan 12, 2023

Hiding the title (even for posts) is something that I think we need to offer more granularly though, not requiring people to fork a template for it.

I agree with @mtias.

Reading through this thread, most of the proposals seem to be around having a toggle of some kind to turn the title on/off.

I wonder if we could simplify things even further if when you hit the delete key while on an empty title, we just removed the title. You could always click undo (or command +z) if you deleted it by mistake. Here's a quick mock up:

CleanShot 2023-01-12 at 11 55 22

@scruffian
Copy link
Contributor Author

@davemart-in that's a cool idea, but we also need a way to get it back if I change my mind later on.

@carlomanf
Copy link

One thing to consider is that Page Title is used for the browser title tag, and for other SEO related things, so removing it from the template altogether has unintended consequences.

#27093 seems to cover the concerns raised. Should this issue be closed in favour of that one?

@draganescu
Copy link
Contributor

@carlomanf I like davemart-in 'a approach involving the use of the post title block better than moving the title to the top bar :)

@CreativeDive
Copy link
Contributor

CreativeDive commented Mar 2, 2023

In my opinion the post title for post, pages or post types should be removed completely from the editor content and should moved to the editor header.

post-title

Why? The post title can be placed in a completely different position by custom templates. But the current post title is always at a fixed position in posts, pages or post types. That is very confusing.

Having the post title in the editor header would be the best solution overall.

Additionally, there should be a sidebar option to hide the post title from the template in certain cases.

@porg
Copy link

porg commented Mar 8, 2023

Setting title + Whether/how to display titles?

Ideal user experience:

  • By default combined (beginners & major use case)
  • But on demand should be separate concerns (advanced use cases).

User Needs

  1. Setting the title is a metadata basis for many things:
    • html > head > title with modifications by theme or plugins (such as prefixes, suffixes, etc)
    • Basis for menu title (again you can alter it)
    • Title in content aggregation pages (categories, etc)
    • Title for search results of the website search engine
    • Title in the backend in page/post lists
  2. Title display shall support everything from totally-uniform designs strong per-page customizations:
    • a) Template-only-workflow
    • b) Toggling on/off per page (but otherwise using what template dictates)
    • c) Strong per-page customizations (individual styling of title, arbitrary position of title block in page flow, e.g. on top of image cover, in column, etc)

Proposed UX design which would support all this!

Lifecycle of a new page/post in the Block Editor

  1. If the used template contains a Post Title block in the content area, it is shown as such.
  • ✅ This is as WYSIWYG as we can be.
  • ✅ Direct manipulation of the post title block on canvas as a means to toggle on/off title display complimentary to the Inspector Panel (2c).
    • Backspace ⌫ two more times after title field cleared — As shown in mockup by @davemart-in
    • Delete block by DEL ⌦ key or block context menu.
    • 👉 Usually blocks that are part of the template cannot be deleted in the Block Editor, but for the Title block this behavior modification must be implemented to support an intuitive UX.
  1. If the used template contains no Title block then the Editor Viewport starts really blank (or with the default sample content).
  • ✅ Again this makes the UX more WYSIWYG than currently! Templates without a title won't falsely show it on the Block Editor canvas anymore. Great realism! No more need to mentally abstract or use a separate browser tab for previewing!
  • a) Autosaving or [Save as a draft] does not yet prompt for a title. Post-ID ensures proper persistence. We don't annoy the user prematurely. (This is the ideal case. Possibly doesn't hold. Can be scrapped in doubt).
  • b1) You can insert a Post Title block anywhere in the page flow you like (✅ works in TT3 on WP 6.1.1)
  • b2) or use a Cover block with the new options:
    • ☑︎ Cover Title is Page/Post Title
    • HTML element for title: [ <h1> ▾ ]
  • b3) Similar media block with title integrations that make sense. Ideas?
  • c) Inspector Panel > Page/Post section > Gets title field + toggle + hint or action buttons for block insertion. Complements 2b. Mockup below.
  • d) Enforced title when needed: When you press [Publish] and have not yet set a title by any means, the Inspector Panel gets revealed, the Page/Post section opened, the "Title" field scrolled into viewport and flashes and gets a validation hint: No title set! Type in or use autosuggestion "▾". Autosuggestion is a dropdown with some "best guesses" (page's h1-h5 outline, or if inexistent first 10 words of your first paragraph, etc).

Inspector Panel > Page/Post Section Redesign

PAGE

Summary

 Publish: 2023-03-08 09:10

     URL: mydomain.com/my-awesome-page/

   Title: My Awesome Page
         [√] show where template foresees
          and/or (re-)insert via these blocks:
          [ Post Title ]   [ Cover block ]

Template: Page with Title

@porg
Copy link

porg commented Mar 8, 2023

@scruffian : There's yet no agreement how to do all this, but the discussion clearly shows that the scope of this issue has widened. The issue title should ideally at least reflect that widened scope (not yet any solution). If you agree with that premise, then please change the issue title to something like:

Site Editing: Page Title can be edited / shown / hidden both on Canvas and in Inspector Panel

@porg
Copy link

porg commented Mar 8, 2023

@CreativeDive Title in editing bar

  • Pro: You immediately know what you are editing (think: multiple browser windows/tabs)
    • Pro: Well established UX pattern (Filename in window title of Desktop OS)
    • Con: Redundant. The browser title tells you Edit Page "Title here"
  • Con: Scales not so well in a responsive world.
    • Mitigation possible "This is a long title and …" + expand on hover/click
    • Auxillary elements for the title (such as a toggle or action button in 2c of my proposal) way cleaner/easier in the Inspector Panel.

@CreativeDive
Copy link
Contributor

@porg yes I totally agree, the sidebar panel is an even better position for the title than the editor topbar. The main thing is that the title is no longer in the content area. From today's perspective, this is absolutely the wrong position and confuses the user.

@draganescu
Copy link
Contributor

Considering that we seem to have found a way to offer block hooks #51449 and an Ui for them #52969 maybe we could render a composition of post content as a block list in a larger block template where the post tile block self inserts as a 1st child? This way it can be toggled on and off?

@mabezdek
Copy link

mabezdek commented May 23, 2024

any update here?

@matteoFeduzi
Copy link

I agree with what @CreativeDive wrote, isn't there a way to do this even by editing the block theme? It does a similar thing the Astra theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Title Affects the Post Title Block Customization Issues related to Phase 2: Customization efforts [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests