Creating and using a custom page template

WordPress allows you to create custom templates. These can only be used for pages (not for posts). A custom template allows you to display content differently and to easily use built-in WordPress functions within a template.

Just to give you a good example of what custom page templates are and how they can benefit your site (no matter what theme you're using), let's create a custom version of the archives template. This is also what we will use to create a custom archives page that should be much more useful to our readers than the standard one. The following screenshot shows what the ARCHIVES page looks like on my blog right now:

There are just a couple of small links in the sidebar that redirect ...

Get WordPress 5 Complete - Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.