I am just learning the basics of WordPress and would like to know how to do something.
I understand the concept of templates. I can have multiple pages that run of a single template so that there is a consistent look and feel across the site.
In the php file, I declare say product.php as a template with some code like:
/*
Template Name: Products
*/
This then becomes available as a template option for me in the admin area when I create a new page.
However what I am struggling to understand is the following.
Some pages are completely unique in their structure. I don’t want them to run off a template. I guess the main reason behind this is that an end user may accidentally override the template in the admin section by mistake and I would like to keep this to a minimum wherever it is possible.
What also confuses me is with such a page do you still need to create the page within the WP admin section, or, using whatever method is needed, will it automatically appear under the pages section?
Can someone please explain how this would be done in WordPress.
Thanks for your time and help in advance.
I hope someone else finds this useful. I’ve not tried it yet but I just found out that if you create a file with the name convention page-.php then this will automatically load for the page with that slug.
I knew it had to be possible. Thanks for all your contributions.