community-themes icon indicating copy to clipboard operation
community-themes copied to clipboard

Fix Poetry's missing single post template

Open sandroschutt opened this issue 1 year ago • 6 comments

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

sandroschutt avatar Mar 05 '24 13:03 sandroschutt

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 avatar Mar 07 '24 05:03 MaggieCabrera

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

MaggieCabrera avatar Mar 07 '24 05:03 MaggieCabrera

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!

iamsam2e avatar Mar 07 '24 05:03 iamsam2e

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

thetwopct avatar Mar 07 '24 05:03 thetwopct

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.

sandroschutt avatar Mar 07 '24 12:03 sandroschutt

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

MaggieCabrera avatar Jun 18 '24 18:06 MaggieCabrera