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

"Blog Home" page is the home template on a fresh install #404

Closed
richtabor opened this issue Sep 18, 2023 · 25 comments
Closed

"Blog Home" page is the home template on a fresh install #404

richtabor opened this issue Sep 18, 2023 · 25 comments

Comments

@richtabor
Copy link
Member

richtabor commented Sep 18, 2023

Seems strange to have the "Blog Home" page be the home template on a clean install of WordPress. Related: #100 (comment)

CleanShot 2023-09-18 at 12 38 14
@richtabor richtabor added [Type] Bug Something isn't working [Component] Templates labels Sep 18, 2023
@MaggieCabrera
Copy link
Collaborator

Mmmh, I thought this was the point all along. We have the query loop further down the fold. What would you expect the home page to be? @beafialho I would love to hear your input on this

@beafialho
Copy link

I expected this to be the home page as well, as the business templates are "default".

@richtabor
Copy link
Member Author

richtabor commented Sep 19, 2023

Right, but is “Blog Home” supposed to be the site home page?

@carolinan
Copy link
Contributor

Are you proposing a blog home with only the posts, and a front-page.html with the other patterns?

@webmandesign
Copy link
Contributor

Are you proposing a blog home with only the posts, and a front-page.html with the other patterns?

This is what I would expect from the theme. I've tested TT4 just now on an existing WP install with static front page and dedicated blog page set and I was really surprise about the behavior:

  • static front page worked as expected,
  • but on blog page there was the home.html template content displayed. I expected posts list instead.

Also, I don't quite understand why homepage pattern has to be inserted into the theme template file. Could it be just available as a whole page pattern (like it is in patterns/page-01-business-home.php) a user can insert into the actual static front page content instead?

I'm not sure editing the static front page content by editing the site editor template file is the best from UX point of view. As a user I don't need to know about WP theme template hierarchy and I'm surprised if my actual front page content (the content of Page post type) is overrode by front-page.html/home.html template content.

But maybe I'm talking too much from a classic theme point of view? :)

@richtabor
Copy link
Member Author

Also, I don't quite understand why homepage pattern has to be inserted into the theme template file. Could it be just available as a whole page pattern (like it is in patterns/page-01-business-home.php) a user can insert into the actual static front page content instead?

No, because then headers and footers would be part of a pattern (which means you can't reuse it as an actual pattern, as you'd insert headers and footers on pages that already have headers/footers.

@beafialho
Copy link

Here's a suggestion for a more traditional blogging homepage. I mocked it up using the placeholder users will see when they install the theme on a fresh new site.

We could use the banner on top (which I designed now and would be a new pattern) as a way to make the page more interesting and connected to the rest of the templates and language.

Writing_ Template

The pen emoji would be an image and would need to be there as it's a key element in the design, the description would be a heading followed by a paragraph and the search form.

@MaggieCabrera
Copy link
Collaborator

We would be using the writer footer then throughout the whole website?

@beafialho
Copy link

This footer makes more sense if the blog/writing templates become the default. I don't think it makes sense to use the business footer in this case.

@luminuu
Copy link
Member

luminuu commented Sep 28, 2023

Following up on the conversation in Slack, I agree with Maggie on spicing the home page up a bit, not just leaving the user with just the one post on a fresh install.

My first impression on the suggestion: I landed on the 404 page and now have to search for the content. I'm not really a fan of the search bar as first thing to suggest.

@MaggieCabrera
Copy link
Collaborator

I think the overarching problem with home/front-page is going to come bite us every single default theme... And it will force us every time to deliver simple home templates with just a query block and little else, and I think that's limiting. I don't have a clear suggestion here, and I understand the concerns.

I still feel like it would be more fitting to simply change and use the "writer" home page, personally, but I accept that I'm not one who should make that design decision. The reason is that it gives you the posts but also a lot of context about the author with the sidebar. Also, I don't think we've had a default theme with a sidebar as the main template in quite a while, but I understand that that is a controversial opinion :D

@carolinan
Copy link
Contributor

carolinan commented Sep 28, 2023

What about renaming the default home to front page and then let users create a new home template if they want blog posts on a separate page?

@carolinan
Copy link
Contributor

The problem with having all these patterns in either template is that users are encouraged to edit the template directly and then they will lose their content if they:

  • Switch themes
  • Accidentally reset the customizations.

Because the changes are not saved as page content but only for the theme-specific template.

@jasmussen
Copy link

For what it's worth, I really like the business focus of this theme, and I find it to be a great statement to make. Twenty Twenty-Three, although lovely in its own right, suffered a bit because the default was so barebones.

To that end, anything that lets us keep the business use case, I'd be for, even if this might be unexpected to a theme developer. In that light, I would also think we can push small fixes to enable this use case more clearly; anything from creative bugfixes that have a chance to make it into 6.4, but even the longer view of adding a "Settings" section in the site editor that would allow you to define your home and blog pages, without having to go into the top level of the site. Twenty themes have a one year life-span, after all, so supporting it in more than one release could be a thing.

@MaggieCabrera
Copy link
Collaborator

For what it's worth, I really like the business focus of this theme, and I find it to be a great statement to make. Twenty Twenty-Three, although lovely in its own right, suffered a bit because the default was so barebones.

To that end, anything that lets us keep the business use case, I'd be for, even if this might be unexpected to a theme developer. In that light, I would also think we can push small fixes to enable this use case more clearly; anything from creative bugfixes that have a chance to make it into 6.4, but even the longer view of adding a "Settings" section in the site editor that would allow you to define your home and blog pages, without having to go into the top level of the site. Twenty themes have a one year life-span, after all, so supporting it in more than one release could be a thing.

I agree with you here, I'd be sad to see the theme lose what's making it unique, but I really wish we could show the users that they have alternatives to that home page if it doesn't fit their needs. Also, I agree that the theme should be supported all year round by improvements in the editor.

@carolinan
Copy link
Contributor

Actually themes are supported forever

The project just doesn't have people to do the updates and solve the bugs.

@MaggieCabrera
Copy link
Collaborator

Actually themes are supported forever

The project just doesn't have people to do the updates and solve the bugs.

I think what we mean here is that the releases during 2024 should support the theme with upstream enhancements i.e: improving template change flows for example. Meaning that just because something didn't make it in 6.4 at the same time the theme is released doesn't mean it won't be included during the life cycle of the theme being the default one.

@carolinan
Copy link
Contributor

This is true for every theme.

@MaggieCabrera
Copy link
Collaborator

I had a conversation with @mtias about this in particular and he said that as long as we have a way of swapping between templates, it doesn't really matter too much which one is the default one. I agree with Joen that the business one is statement this theme is making and it sets the theme apart from previous ones, which I think its fine like I said, as long as we are offering alternatives to the user.

My instinct is that we let the current home be, since WordPress/gutenberg#54609 should be merged soon (please review if you can!) and make sure we are documenting the template changes well for the release.

@richtabor
Copy link
Member Author

Sounds good; are we good to close this one?

@MaggieCabrera
Copy link
Collaborator

Thank you for the discussion, I'm gonna close it then

@felixarntz
Copy link
Member

felixarntz commented Oct 26, 2023

I have just been referred to this issue based on reporting a similar concern on Slack, apologies on not spotting this earlier.

From reading the comments in here, I cannot see a rationale being mentioned for display all the static business template content on the blog page when it's not the home page. To be clear, that is my primary concern about this.

Trying to clarify:

  • By default, WordPress is set to display the latest posts on the home page.
  • In that setup, the way TT4 currently works is IMO perfectly reasonable: It displays the business template which includes the latest posts, a good set of starter content for the home page.
  • When you however go to Settings > Reading and change the configuration to display a static front page and put the latest posts on another page (e.g. a /blog/ page), this is problematic. A page dedicated to the blog should not start with all the business template content and have the actual blog posts buried far down on the page.

Renaming the home.html template to front-page.html would fix this problem as far as I can tell: The front-page.html template would only be used for the actual home page (i.e. /), while the custom blog page (e.g. /blog/) would rely on index.html, which is the actual blog focused template.

In other words, a new user activating TT4 would still always see the business template on the home page, regardless of how they have that WordPress option configured - so the first impression (based on the elaborate design of the business template) would remain just as good as it is today, while however fixing the problem of a dedicated blog page looking like a home page for those sites that are configured like that.

@felixarntz felixarntz reopened this Oct 26, 2023
@YanCol
Copy link

YanCol commented Oct 27, 2023

The issue with the front-page.html template is that it overrides the Homepage specified in Settings > Reading, making this setting useless. Consequently, if a user has an existing site with a static page set as the homepage (using themes like Twenty Twenty-Three or Twenty Twenty-Two for example), switching to the Twenty Twenty-Four theme causes the homepage to display the default Twenty Twenty-Four content about architecture, instead of the user's selected static page.

@felixarntz
Copy link
Member

felixarntz commented Oct 27, 2023

@YanCol What you're pointing out is a problem of the home.html template implementation, regardless of whether it is used for the static front page or the blog: The template (or more specifically, the posts-grid-2-col.html pattern that it includes) ignores the current main query, which means it displays the wrong content in general, not only if you usage a static front page: Even in its current form, this template results in a broken blog behavior, where page navigation is not working. This is because the template uses inherit: false on the query block and instead forces its own custom query without replicating the expected pagination behavior in another way.

This is in fact an arguably far more severe bug than what is reported in this ticket and should be fixed. Unless an extremely specific customized template (i.e. not something a default theme should have enabled by default), every template needs to include at least one core/query block that uses inherit: true in its configuration, to ensure the content expected on this URL is actually displayed.

Custom core/query blocks are of course fine to use, but there needs to be at least one core/query block in every template that displays the expected content based on the URL (e.g. the specific page or post or list of posts).

Update: I have opened a dedicated ticket for this bug in https://core.trac.wordpress.org/ticket/59759.

@MaggieCabrera
Copy link
Collaborator

I'm closing this after we merged #706. Let's keep improving core so this is easier for future themes

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

No branches or pull requests

9 participants