Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Homepage content & user experience #60

Closed
colorful-tones opened this issue Oct 7, 2021 · 11 comments · Fixed by #69
Closed

Homepage content & user experience #60

colorful-tones opened this issue Oct 7, 2021 · 11 comments · Fixed by #69

Comments

@colorful-tones
Copy link
Member

colorful-tones commented Oct 7, 2021

Perhaps I'm not familiar enough with Block Theme/FSE, but as an everyday editor I would be confused by the following dilemma. I created a new empty WordPress site in Local. I have TwentyTwentyTwo theme activated and latest Gutenberg.

I already have 44 posts I've generated using FakerPress plugin. I visit my site's homepage and see: "Welcome to WordPress. This is your first post. Edit or delete it, then start writing!" Here, the confusion begins.

My first instinct is to check my Settings > Reading and verify that "Your homepage displays: Your latest posts". This is contradicting what I'm seeing on the homepage though. 😕

It is likely this is a user experience improvement for Gutenberg Full Site Editing experience, and just wondering if I'm missing something?

Screen Shot 2021-10-07 at 4 42 39 PM

Screen Shot 2021-10-07 at 4 41 19 PM

@colorful-tones colorful-tones changed the title Homepage content implies I have no content Homepage content & user experience Oct 7, 2021
@colorful-tones
Copy link
Member Author

I've gone ahead and installed, activated WordPress Beta Tester and I'm now running WordPress 5.9-alpha-51894 and still the same experience. 🤔

@colorful-tones
Copy link
Member Author

colorful-tones commented Oct 7, 2021

Furthermore, as a user I'm on my homepage and seeing the "Welcome to WordPress. This is your first post. Edit or delete it, then start writing!" message and I'm confused. So, I proceed with thinking that maybe I need to add a Query Loop block to the page. So, I click "Edit site" in WP Admin Bar, and I'm in the Site Editor and see: "This is for placeholder content." and I'm not able to add a Query Loop block within the main content. Now, I'm super confused, and likely frustrated.

Screen Shot 2021-10-07 at 4 55 23 PM

@colorful-tones
Copy link
Member Author

Also, the "Welcome to WordPress. This is your first post. Edit or delete it, then start writing!" gives me little actionable items. The "Edit" and "delete" are not links and there is not even an option to "Edit Page" in the WP Admin Bar (just "Edit Site", but it says and implies to edit my first post. 🤷‍♂️

@Sandstromer
Copy link

Sandstromer commented Oct 8, 2021

I am able to recreate this issue with the same fresh install default 'Reading' settings.

It looks like this is caused by the theme's front-page.html template, which only contains the Post Content block <!-- wp:post-content {"layout":{"inherit":true}} /-->, rather than the Query Loop block that is found in the index.html template.
The consequence of this is that the full content of single oldest post (usually the default Hello World! post) is displayed on the front page, rather than the expected latest posts.

Not sure if this is a theme issue or a deeper core/Gutenberg issue, as I would have thought that themes should be able to bundle a front-page.html template and expect to have this template used only where the user has defined a static homepage.

@kjellr
Copy link
Collaborator

kjellr commented Oct 8, 2021

Not sure if this is a theme issue or a deeper core/Gutenberg issue, as I would have thought that themes should be able to bundle a front-page.html template and expect to have this template used only where the user has defined a static homepage.

I think the issue here is template hierarchy, and to be honest, it always been confusing. 😅

I think the solution is that we shouldn't actually be using front-page.php here, but off the top of my head I'm not sure the correct template(s) we need to use instead. Might also be a Gutenberg issue though.

@kjellr
Copy link
Collaborator

kjellr commented Oct 8, 2021

I think the solution is that we shouldn't actually be using front-page.php here, but off the top of my head I'm not sure the correct template(s) we need to use instead. Might also be a Gutenberg issue though.

It's home.php. 😄 #69 should take care of this.

@Sandstromer
Copy link

It's tricky because in a classic php theme you could do something like have a conditional check for show_on_front, use a dedicated front page template if true, and use the index or home template if not true.

In block themes we lose this ability and have to follow the hierarchy.

TT1 Blocks theme has a page-home.html template that the user can select, but as I understand it there doesn't seem to be any way of using conditionals within a block theme.

@kjellr
Copy link
Collaborator

kjellr commented Oct 8, 2021

Yeah, I just reworked #69 to use a page-home.html and avoid using a home.html entirely. I think that's our best bet for the moment.

@pattonwebz
Copy link
Member

Yeah, I just reworked #69 to use a page-home.html and avoid using a home.html entirely. I think that's our best bet for the moment.

Does using page-home.html then rely on the slug of the page being home?

@kjellr
Copy link
Collaborator

kjellr commented Oct 8, 2021

Yeah, which isn't ideal.

@pattonwebz
Copy link
Member

Not ideal but I don't have any better ideas for an alternative either :(

What is kinda nice though is showcasing more granular use of template hierarchy - which isn't often seen in themes and I don't think ever used in a default theme :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants