WordPress / community-themes

A collection of Block Themes built by the WordPress community.
70 stars 26 forks source link

Fix Poetry's missing single post template #142

Open sandroschutt opened 4 months ago

sandroschutt commented 4 months ago

I've created the template and patter files for single posts.

MaggieCabrera commented 3 months ago

Header and footer templates don't initialize on first render of the page, but removing & reincerting the component shows they works - looks to be due to working out of a subdirectory; cloning into /themes does make those components render on first page load in FSE editor

Themes in a subdirectory is a valid usecase, so we need to account for that. Good catch!

MaggieCabrera commented 3 months ago

@samtoohey93 are you sure that you have the latest version installed? looking at the code, the template parts should be loading correctly

samtoohey93 commented 3 months ago

Issue was template component was not rendering on first page load initially.

image

Upon investigation @sandroschutt it looks like removing the theme slug resolves the issue and allows the component to render correctly.

<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

Hope this helps!

thetwopct commented 3 months ago

Related issue - https://github.com/WordPress/community-themes/issues/128

sandroschutt commented 3 months ago

Header and footer templates don't initialize on first render of the page, but removing & reincerting the component shows they works - looks to be due to working out of a subdirectory; cloning into /themes does make those components render on first page load in FSE editor

Not sure if we're in the same issue here. I tested it in my dev stage and just created a dedicated test stage for replicating the problem you mentioned, but it didn't show.

MaggieCabrera commented 2 weeks ago

We have similar work done in https://github.com/WordPress/community-themes/pull/146 how can we conflate the two?