I need to have more than one headers so this looks as a good idea but I'm not sure if it is valid. If so, what am I supposed to name a file? I named it head.php so far.


  <!-- <head> tag -->
  <?php get_template_part('head.php'); ?>
    <nav> Navigation </nav>
    <h1> Page title </h1>
  • But generally you can name your template parts anything you want, as long as you write code to include them into other templates. – Rup Oct 29 '20 at 9:55
  • By header I mean <header> tag which in my case includes Page Title and Navigation. – Anderson Oct 29 '20 at 10:11
  • Then yes, you can split up the HTML any way that's useful. – Rup Oct 29 '20 at 10:20
  • Oh, OK, so you did mean the <head> tag? (So when you said multiple <header> tags you meant multiple header templates?) But yes, you can do that fine. Although normally there's only a few lines in the <head> tag anyway - most of it is generated by the call to wp_head(). – Rup Oct 29 '20 at 11:42
  • Thank you very much – Anderson Oct 29 '20 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.