admin管理员组

文章数量:1122846

I am building a project using WordPress 6.6.1. I have opted to create a child them which extends TwentyTwentyFour and therefore relies on the new block editor which is packaged in that parent theme.

I have always relied on template files and the get_template_part() features of wordpress when I develop a project. The terms "Template" and "Template Part" have a new, different interpretation in the block editor . Now, for the life of me, I can't figure out how to call Get_template_part() from a page in Wordpress. Is it even possible?

Also, is it still possible to create a template file in PHP, include it in the theme directory and reference it from the Wordpress page editor? This used to be very easy and I dare say was fundamental to developing a theme. They can't have simply erased this TwentyTwentyFour... can they?

I am tempted to just use a theme which does not rely on block editing, but it feels lazy to shirk away from this new direction which the platform is taking.

本文标签: GetTemplatePart and Template files in TwentyTwentyFour Block Editor