I’m fairly new to WordPress and I have a few questions/comments about custom templates.
As I understand it, the declaration “Template Name: MyCustomTemplate” at the head of a template file allows the user to associate a post or page (or indeed custom type) with their custom template (e.g. “MyCustomTemplate”) via the admin section.
1. What happens when two template files share the same template name declaration?
2. If this is problematic, what is the best-practice to avoid such conflicts? A plugin?
3. If this is not a problem, how does WordPress select the correct template file? Hierarchy?
4. Using the standard WordPress core (i.e. getheader(), getfooter(), etc.), can I utilise custom header and footer templates (etc.) which may have different CSS and JS declarations? (I suppose include statements might be the answer).
- The topic ‘Understanding Custom Templates – Newbie Perspective’ is closed to new replies.