Some theme contains more than one templates to chose in Page editor. enter image description here

What is this called? How can I register more templates to my theme?


Create .php file with name like template-blogs.php, inside file write a Template Name in php comment, include header & footer. here is the sample of test template

 * Template Name: Test Template
<div class="content_area">
   <!---Write Your PHP Code Here--->
  • And one of the important thing is the /* Template Name: Bla Bla Bla */ part right? – Lai32290 May 20 at 11:12
  • Thank you so much! – Lai32290 May 20 at 11:13
  • Happy to help you! Kindly mark it as answer. – Parth Shah May 20 at 11:14
  • 1
    For sure, I'm just waiting "cooldown" to mark it. – Lai32290 May 20 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.