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

Fix Poetry's missing single post template #142

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

sandroschutt
Copy link
Contributor

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

Copy link
Collaborator

@samtoohey93 samtoohey93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@MaggieCabrera
Copy link
Collaborator

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
Copy link
Collaborator

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

@samtoohey93
Copy link
Collaborator

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
Copy link
Collaborator

Related issue - #128

@sandroschutt
Copy link
Contributor Author

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 MaggieCabrera linked an issue Apr 5, 2024 that may be closed by this pull request
@samtoohey93 samtoohey93 self-assigned this May 16, 2024
@MaggieCabrera MaggieCabrera force-pushed the fix/poetry/single-post-template branch from b96260e to dc0d7a9 Compare May 21, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry: Single posts template
4 participants