gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Site Editing: Hide page / post title

Open scruffian opened this issue 5 years ago • 34 comments

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 avatar Jan 28 '21 17:01 scruffian

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

mtias avatar Jan 28 '21 19:01 mtias

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?

scruffian avatar Jan 28 '21 21:01 scruffian

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 avatar Jan 29 '21 09:01 mtias

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.

Sandstromer avatar Jan 29 '21 11:01 Sandstromer

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).

mtias avatar Jan 29 '21 12:01 mtias

Would something like this work?

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

lukecarbis avatar Feb 07 '21 19:02 lukecarbis

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

scruffian avatar Feb 10 '21 15:02 scruffian

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?

lukecarbis avatar Feb 10 '21 21:02 lukecarbis

I think on the title block is better :)

mtias avatar Feb 11 '21 12:02 mtias

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

deborah86 avatar Aug 14 '21 04:08 deborah86

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

mtias avatar Aug 17 '21 11:08 mtias

@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.

simison avatar Oct 06 '21 08:10 simison

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.

deborah86 avatar Oct 20 '21 13:10 deborah86

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 ?

jordesign avatar May 20 '22 00:05 jordesign

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

lukecarbis avatar May 20 '22 02:05 lukecarbis

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.

scruffian avatar May 24 '22 14:05 scruffian

@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

deborah86 avatar May 25 '22 11:05 deborah86

Related #16776

draganescu avatar Jun 16 '22 09:06 draganescu

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?

vcanales avatar Oct 27 '22 14:10 vcanales

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.

dashkevych avatar Nov 01 '22 18:11 dashkevych