Fix Poetry's missing single post template#142
Conversation
There was a problem hiding this comment.
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! |
|
@samtoohey93 are you sure that you have the latest version installed? looking at the code, the template parts should be loading correctly |
|
Issue was template component was not rendering on first page load initially. Upon investigation @sandroschutt it looks like removing the theme slug resolves the issue and allows the component to render correctly. Hope this helps! |
|
Related issue - #128 |
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. |
b96260e to
dc0d7a9
Compare
| <!-- wp:group {"layout":{"type":"constrained"}} --> | ||
| <div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px","right":"0","bottom":"96px","left":"0"},"blockGap":"40px"}},"layout":{"type":"flex","flexWrap":"nowrap","orientation":"horizontal","verticalAlignment":"top","justifyContent":"center"}} --> | ||
| <div class="wp-block-group" style="padding-top:96px;padding-right:0;padding-bottom:96px;padding-left:0"><!-- wp:group {"style":{"spacing":{"padding":{"top":"96px"}}},"layout":{"type":"default"}} --> | ||
| <div class="wp-block-group" style="padding-top:96px"><!-- wp:post-date /--></div> |
There was a problem hiding this comment.
Let's use presets instead of hardcoded values for spacing
|
|
||
| <!-- wp:group {"style":{"spacing":{"padding":{"right":"56px","left":"56px"},"blockGap":"32px"},"border":{"left":{"width":"2px"}}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} --> | ||
| <div class="wp-block-group" style="border-left-width:2px;padding-right:56px;padding-left:56px"><!-- wp:image {"id":15,"width":"56px","height":"56px","sizeSlug":"full","linkDestination":"none"} --> | ||
| <figure class="wp-block-image size-full is-resized"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/feather-small.png" alt="" class="wp-image-15" style="width:56px;height:56px"/></figure> |
There was a problem hiding this comment.
let's use get_template_directory_uri instead
| <!-- wp:post-author {"showAvatar":false,"showBio":false,"textColor":"custom-contrast"} /--></div> | ||
| <!-- /wp:group --> | ||
|
|
||
| <!-- wp:post-content /--></div> |
There was a problem hiding this comment.
Should we add the comments block or is it ok not to have it for this theme?
|
We have similar work done in #146 how can we conflate the two? |

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