Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage with alternate blocks and query on inner paginated views #81

Closed
DaisyOlsen opened this issue Feb 20, 2023 Discussed in #63 · 12 comments
Closed

Homepage with alternate blocks and query on inner paginated views #81

DaisyOlsen opened this issue Feb 20, 2023 Discussed in #63 · 12 comments
Assignees
Labels

Comments

@DaisyOlsen
Copy link

Discussed in #63

Originally posted by justintadlock January 20, 2023
Recently, an issue came up on the support forums where a user wanted to create a custom-designed homepage with a separate design for page 2+. In classic themes, this is merely a few simple bits of PHP thrown in to contextually change the output. However, block themes are static and have no such option. The forum thread does have a solution.

While this was a user request, I could see this being something that could work for the Developer Blog. Designers, freelancers, and agencies might want to employ the solution in their own work. It is not an uncommon pattern.

CC: @kathrynwp, @richtabor - Adding both of you since you were involved with figuring this out.

@DaisyOlsen
Copy link
Author

I've started the process of capturing available information on this topic and will create a post draft in a Google document

@DaisyOlsen
Copy link
Author

I've given the steps outlined in the support thread a try, and I think this is a good way to mimic an alternate query on inner pages with no code needed. It does have a gotcha with the pagination, but it's can be smoothed over with some clever hyperlinked text and formatting.

I'm pondering the possibility of spinning this in a more developer-oriented direction by outlining these no-code steps and then presenting the process to create a similar outcome with locally registered patterns hidden from the inserter(with some conditional logic) templates that use the template part block along.

It's a rough idea and pseudo code in my head right now, but I'll see if it works as well IRL as it does in my head.

@DaisyOlsen DaisyOlsen changed the title Tutorial on creating a unique homepage that differs from page 2+ Feb 23, 2023
@DaisyOlsen
Copy link
Author

I'll be doing a scaled-down variation on the idea of contextual blocks via patterns in my live stream today. Should be an interesting adventure.

@DaisyOlsen DaisyOlsen changed the title Homepage with with alternate blocks and query on inner paginated views Feb 27, 2023
@bph bph added the flow: approved can move forward label Mar 2, 2023
@DaisyOlsen
Copy link
Author

I've created a draft of this post. It's ready for a first review.

https://developer.wordpress.org/news/?p=995&preview=1&_ppp=0f207bb2cc

I'm especially interested in the general flow of the content.
If anyone has an idea for a better title... I'm stumped.

@marybaum
Copy link
Member

marybaum commented Mar 8, 2023

I'll be happy to take a gander! And I"ll see what we can do about a headline ;-)

@mburridge
Copy link

You will create templates to achieve a layout that displays a total of 12 posts per page. The first page of recent content includes one featured post with a full-width featured image, two posts with a medium-sized featured image aligned to the left, and nine posts arranged in a grid layout. Adding a hyperlink to the second page of a posts page completes the effect, displaying 12 posts in a grid layout.

While reading this introductory paragraph I found it hard to visualise what the layout would look like, or at least the attempt to visualise it slowed my reading of the paragraph. Maybe an image in the intro that illustrates what the final layout will look like would help with more easily understanding the paragraph.

@bph
Copy link
Collaborator

bph commented Mar 9, 2023

references to UI elements are bolded. (see Documentation Style guide)

Example:
The current paragraph:
"Next, you will need to set the page named “Home” as the “homepage” of your website and the page named Blog as your “posts page.” To do this, go to your WordPress dashboard and click “Settings” in the left-hand menu. Then click on “Reading.”

Should be:
Next, you will need to set the page named “Home” as the homepage of your website and the page named Blog as your posts page. To do this, go to your WordPress dashboard and click Settings in the left-hand menu. Then click on Reading.

You would have to change that throughout your post, please.

@marybaum
Copy link
Member

marybaum commented Mar 9, 2023

Okey dokey! I've had my way with this post.

I suggest this title:

H1:
Block theme templates: the easy way to build an elegant grid of posts
h2:
This tutorial shows you how!

@DaisyOlsen
Copy link
Author

I love the changes you made @marybaum; thank you so much.

I've given it all another pass and adjusted some formatting per the Documentation Style Guide.

I've moved the status forward to Needs 2nd Review. If everything looks good, feel free to publish. I'm not sure if we're trying to schedule things to go out at any particular intervals. I'll keep an eye out here for any other edits that might be needed.

@marybaum
Copy link
Member

marybaum commented Mar 12, 2023 via email

@DaisyOlsen
Copy link
Author

I've added props and alt text to the images. cc: @bph to clarify next steps.

@bph bph closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants