Make WordPress Core

Opened 17 months ago

#56847 new defect (bug)

Template parts and patterns

Reported by: matteomarchiori97's profile matteomarchiori97 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0.3
Component: Themes Keywords:
Focuses: template Cc:

Description

Good day,
I am developing a WordPress theme (published, but still work in progress, W3CSSPress).
While I was trying to get a value from a function (in functions.php) into a component of the theme I noticed a strage behavior.

If I try to develop a normal template part in HTML and include in it a pattern which contains a dynamic content, then I move away the templates and reload the website (classic version of the theme) and then I move back the templates (block version of the theme) I find that the dynamic generated part got cached and is not generated again anymore.

Istead, if I avoid to use a template part and I put its content inside a pattern and I call it from the templates of the pages (like, front-page.html) the content gets dynamically regenerated correctly.

This could be a good behavior from a caching and performance point of view, but if a template part has got some dynamic content it should be regenerated.

Is it fixable in some way?

Change History (0)

Note: See TracTickets for help on using tickets.