To create a new template of a page of WordPress simply make a copy of the page.php file and rename theme. Then you have to include a comment with the filename of the template for WordPress detect it and let you use the template. If the file is called eg "Page_index.php" We would put:

<? Php
/ *
Template Name: JavierRguez
* /

The value we indicate will be the file name with the first letter capitalized.

To assign the new template to the page, let's edit page, and on the right side in the block Page Attributes you must step out option Page Template.

If this is not done, when you edit the page, or edit quick edit mode, you will not leave the option or you will drop down with the only default option.

The official documentation:


Use of cookies

This site uses cookies for you to have the best user experience. If you continue to browse you are giving your consent to the acceptance of the above cookies and acceptance of our cookies policy, Click the link for more information.

Notice of cookies

Pin it on Pinterest

Share This


Share this with your friends!

Veo que te gusta mi Blog...

Si te ha parecido interesante este artículo, no esperes a suscribirte a mi blog. Cuando vuelva a escribir otro seguro que te interesará y no desearás no haberte enterado. Puedes suscribirte con total tranquilidad de que no recibirás spam. Lo odio igual que tu. Solo quiero que aprendas cosas nuevas y te sientas agusto con mis artículos. ¡Gracias!

Thank you for subscribing!