0

I'd like to add a custom page template to the drop down menu shown in the picture.

Had a good google at this but couldn't find anything, was too hard to form a concise query.

Thanks for reading

0

1 Answer 1

0

Do you want to add this template via a plugin or using the theme? If you want to use the theme you need several things:

  1. The PHP file which will be responsible for the page. The file itself can be named in two ways: page-{slug}.php or page-{id}.php. Here is an explanation what each one of them does.
  2. You need to add the template name. Right after the opening <?php tag you need to add:

    /* Template Name: Your Template Name */

This name will be also used in the drop down. 3. You need to code the logic for the template.

Here is a good article on page templates.

0

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