-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update and align template descriptions #36000
Conversation
Perhaps this is an appropriate place to discuss the Index template :) Fleshing out those thoughts a little more... In the WP template hierarchy, Index is used as a fallback when any of the following templates do not exist:
In php themes it is capable of fulfilling this role by including logic to determine what the visitor has requested on-the-fly. In block-theme world, this doesn't work so well because the template cannot contain this logic. Consider a block theme that only supplies an Index template...
All that to say, in block-theme world the Index template takes on a more singular purpose, so perhaps it can have a more intuitive name when it appears in the UI? Essentially, Index is useful for:
In that light, perhaps Index can simply be called "Posts"? This would make the minimum required posts for a block theme:
Which seems a little more intuitive than the current setup. |
Isn't that the case with classic themes too, though? If my theme was just an Either way, I think the "Posts" framing makes sense. |
Editorial here. Sorry for the delay in sending notes. Here they are, in bold. INDEX HOME SINGULAR SINGLE FRONT PAGE: CATEGORY: TAG |
That is indeed the case, but I don't think anyone building a theme for general consumption would do that? The wp.org theme review guidelines say this about Index:
Since block templates cannot perform any logic, it would not be possible for index.html to "include all functionality" of the theme. Therefore, a block theme consisting of only index.html wouldn't really work for a typical WordPress site, and consequently I don't suppose such a theme would be acceptable in the theme directory. |
@SeywardDarby Thank you! A couple of thoughts:
I'm not sure that this description for the Home template is quite right. Home becomes the template for the posts page regardless of whether the Front Page template exists or not. Perhaps we could revise:
This still doesn't feel quite right though... for that second use case, "Home" feels like a really contradictory name. I wonder if we can come up with something better. This all kind of ties in with the discussion around the Index template. In the block theme world, I'm not really sure we need both Index and Home – they're both serving the same purpose. We may need to work on these two particular templates in isolation.
Singular will only ever be used if Single or Page don't exist at all. It's useful when a theme author wants to use the exact same template for posts and pages. So perhaps this can just be:
Changing "Single" to "Post" makes sense to me. Edit: Just remembered that we already updated the name of this one to "Single Post" :D |
Perhaps a better way to frame Index / Home: Index will resolve to display any archive when
The unique feature of the home template is that it will always display latest posts, whether that is because it resolves for the homepage, or the posts page when a static page is set as the homepage. So perhaps we can call the home template "Latest posts" with the description:
|
Co-authored-by: Carolina Nymark <hi@themesbycarolina.com>
Hi. Sorry to be slow to chime back in here. If you would like me to review revised text, please let me know and point me to the latest version (ideally in a Google doc if one exists/can be made). One thought for the list view: The shortened versions could work well, but we'd need to be consistent about the grammar and syntax, and singular versus plural. For instance, right now we have "Page: Individual Pages" and "Single: A single blog post," which aren't stylistically consistent. Something like "Page: A single page" and "Post: A single blog post" would be consistent. Again, please let me know if you would like me to review revised text in full. Thanks! |
The descriptions in the OP are the latest versions :) I think it will be tricky to eliminate the repetitious "Displays..." prefix and still have the descriptions adaptable to different contexts. |
OK. A few questions:
|
I think it's possible, but would need a dev to confirm. The trade-off is there's twice as much to translate. I don't know if it's worth it.
Sure. Words like 'display' and 'render' appear quite a lot in the current template documentation. I suppose 'render' is technically the correct term, but I figured 'display' was more user-friendly. Perhaps it's ok to use 'render' though, seeing as template editing is a more advanced feature. Of course 'show' and 'present' work too :D |
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.
Describing the index is tricky, but I think displaying posts is the most common result when the index is used as a fallback.
We can continue to refine. If this makes it in to the beta we'll hopefully get feedback :) |
I noticed that the descriptions on Core are different from these ones. Please don't forget to add the "backport to WP beta/RC" label in 5.9 targeted PRs otherwise, these changes will get lost in the future. |
I added the label back to sync the wp/trunk branch. (this is already in core now) |
* Update and align template descriptions * More refinements * Update descriptions * More updates * Optimise! * Localize privacy policy description Co-authored-by: Carolina Nymark <hi@themesbycarolina.com> * Descriptions Co-authored-by: Carolina Nymark <hi@themesbycarolina.com>
@jameskoster is working on updating the template names in this PR: |
Now that we're beginning to get a better understanding for where these descriptions will appear, we can begin to refine them.
This PR makes the language used across descriptions consistent, and in some cases significantly shortens them.
na
Before
After
Some of the changes are simple optimisations. Others are more profound, like the Index template. In php themes, it is standard practise for the index template to serve as a fallback by programatically detecting if the visitor has requested an archive or a single post, and then acting accordingly. In the block theme paradigm this is not possible, making the Index template more singular in its purpose.