Tag Archives: header

Page template and custom header

Few quick heurekas about these topics. Page template
  • Name your file like this: my-template.php
  • At the beginning of my-template.php add:
    
    
    
    Actually it showed up in both cases Template name: My-template and Template name: my-template. It is traditionally used with capital letter, but I have to check, maybe it is a standard
Different header
  • Name your file like this: header-yourheadername.php
  • To call it out on your about page, add into template-file.php or about-template.php:
    if(is_page('about')){
        
        get_header('yourheadername');
    
    } else {
        get_header();
    }