PHP templates don’t show as template option to select

[ad_1]

hi guys, I try to made a custom theme based in the docs of wp and I currently use the last versión 6.5.4.

1. So I want to create a custom page template then I created a file page-test.php in the root of the theme but when I go to edit a page in admin this template don’t show in the template option only appears the html templates set them in the json file but the weird of this is if I select the ‘quick edit’ option my template appears as a option and works.

2. According to the docs I can organize my files in a folder called “template-parts” and this dir can contain sub folders to custom templates so I create this “template-parts/page/page-main.php” but this template don’t showed neither edit page or with the quick edit’ option.

Only I want this files appears as options when I edited a page from admin, agradezco mucho cualquier ayuda.

[ad_2]
1 Comment
  1. It is working correctly in the first screenshot.

    Template parts aren’t templates, they’re pieces of code you use to build your templates on the frontend using `get_template_part()`

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer