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

Move front-page template to page-home instead. #69

Merged
merged 3 commits into from
Oct 8, 2021

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Oct 8, 2021

Fixes #60. This PR renames front-page.php to page-home.php so that the theme will respect the user's front page settings.

@kjellr kjellr self-assigned this Oct 8, 2021
@kjellr kjellr requested a review from jffng October 8, 2021 14:14
@kjellr kjellr changed the title Move front-page template to home instead. Move front-page template to page-home instead. Oct 8, 2021
@kjellr
Copy link
Collaborator Author

kjellr commented Oct 8, 2021

I reworked this a bit (and updated the description). Originally I tried having a home.html template that had the large black header, but that forced a lot of extra scrolling when you paginated. I might add a home.html template later on, but I'll need to redesign it so this is smoother.

This new approach forces folks to either name their homepage with the home slug, or to manually select the page-home template for their homepage. But I think that's more or less what the template hierarchy dictates. Maybe we can use starter content to make that easier.

@@ -1,7 +1,7 @@
<!-- wp:template-part {"slug":"header","tagName":"header","style":{"spacing":{"padding":{"right":"max(1.25rem, 5vw)","left":"max(1.25rem, 5vw)"}}},"layout":{"inherit":true}} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"max(1.25rem, 5vw)","left":"max(1.25rem, 5vw)"}}}} -->
<div class="wp-block-group" style="padding-right:max(1.25rem, 5vw);padding-left:max(1.25rem, 5vw)"><!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","perPage":10},"tagName":"main","displayLayout":{"type":"flex","columns":3},"layout":{"inherit":true}} -->
<div class="wp-block-group" style="padding-right:max(1.25rem, 5vw);padding-left:max(1.25rem, 5vw)"><!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","perPage":12},"tagName":"main","displayLayout":{"type":"flex","columns":3},"layout":{"inherit":true}} -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a separate issue, but is there a way to get the query to respect the Reading settings for max blog posts to show?

Screen Shot 2021-10-08 at 11 49 09 AM

I think it's 10 by default.

Copy link
Collaborator Author

@kjellr kjellr Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think if you leave that out it will respect this setting. But we definitely want to have the default be a multiple of three though since we're showing things in three columns. It seems like setting that here is the best way to do this for a block theme. 🤷‍♂️

@kjellr kjellr merged commit 567e930 into trunk Oct 8, 2021
@kjellr kjellr deleted the try/using-home-template branch October 8, 2021 16:03
jeffpaul added a commit to jeffpaul/twentytwentytwo that referenced this pull request Nov 16, 2021
Note that some of the references below are not the only contributions (commits, PR review, helpful issue input, etc.) from these folks, but merely the first ones I encountered while reviewing items committed to `trunk` since the initial branch commit.

@westonruter via  WordPress#51
@ntwb via WordPress#73
@juricav via WordPress#113
@Sandstromer via WordPress#69
@jasmussen via WordPress#74
@melchoyce via WordPress#16
@Riyadh1734 via WordPress#182
@desrosj via WordPress#223
@beafialho via WordPress#172
@clucasrowlands via WordPress#171
@Otto42 via WordPress#28
@luminuu via WordPress#107
@felixarntz via WordPress#240
kjellr added a commit that referenced this pull request Nov 17, 2021
* add missing props to CONTRIBUTORS.md

Note that some of the references below are not the only contributions (commits, PR review, helpful issue input, etc.) from these folks, but merely the first ones I encountered while reviewing items committed to `trunk` since the initial branch commit.

@westonruter via  #51
@ntwb via #73
@juricav via #113
@Sandstromer via #69
@jasmussen via #74
@melchoyce via #16
@Riyadh1734 via #182
@desrosj via #223
@beafialho via #172
@clucasrowlands via #171
@Otto42 via #28
@luminuu via #107
@felixarntz via #240

* add dotorg handles to CONTRIBUTORS.md

* Fix Rich's WP.org username.

Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Homepage content & user experience
3 participants