This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Change post pattern on home.html
, update template slugs
#706
Merged
MaggieCabrera
merged 9 commits into
trunk
from
705-blog-template-homehtml-ignores-main-query-and-breaks-navigation
Oct 30, 2023
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e02a2e7
Rename home to front-page, change pattern, update template slugs
luminuu eddcca7
Fix PHPCS errors
luminuu 209f792
add new block pattern for a list of posts
MaggieCabrera 6877671
removed pattern
MaggieCabrera dafa50f
Revert renaming change
luminuu c7469d5
Fix merge conflict from trunk
luminuu 0bb39c6
Merge branch 'trunk' into 705-blog-template-homehtml-ignores-main-que…
luminuu 2094129
Merge branch '705-blog-template-homehtml-ignores-main-query-and-break…
luminuu dd8fc54
created block pattern
MaggieCabrera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- wp:pattern {"slug":"twentytwentyfour/template-home-business"} /--> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is used as part of
front-page.html
while the WordPress site is configured to display a "static front page", it would look odd, since in that case there would only be the one page, with its excerpt shown in one of the three columns.I'm not sure how we could fix this without modifying the WordPress template hierarchy. Honestly, I find this an odd configuration of WordPress core to choose
front-page
regardless of whether that page is configured to show the blog or a static page.Potentially we can use the
frontpage_template_hierarchy
filter to customize this for TT4 to prefer a custom template, e.g. something like:If we did that in
functions.php
, we could have both afront-page.html
andfront-page-home.html
template for the individual situations.front-page-home.html
could use the content as is here, whilefront-page.html
would instead replace those post columns with something similar topage.html
, i.e. displaying the content of a single individual page.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see a video of how that would work with the Site Editor. Why is it a PHP file? How do users edit it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting more confused the more we talk about it. I assumed this was an issue so I renamed it, and now it seems to be a bigger issue that it's renamed? I'm fine reverting this change, but I have a hard time understanding what would be the best case, as it feels like whatever we do it's not. Adding code to fix something is not my preferred idea, because then you have to further explain how things work, and it will be harder for the average user to work with TT4. Since it's a legacy product, that's not what I want to achieve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shouldn't be fixed in the theme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with this as well; to keep the scope/discussion focused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you all that fixing it in the theme would be merely a workaround for it being fixed in core, so I'm totally supportive of not doing that. We just won't be able to use this template as
front-page.html
until that part is fixed in core. I'm happy to open a Trac ticket for that part, so that at least in the future it could be reconsidered.@luminuu
It's an issue that the blog template only shows the blog posts buried far down on the page, but that's a separate and minor issue compared to what I flagged in #705 / https://core.trac.wordpress.org/ticket/59759.
Given the above limitations of core, I think we should for now stick to only fixing the
home.html
template, without renaming it. In other words, that won't address #404, but it will address #705 / https://core.trac.wordpress.org/ticket/59759.