Header & footer add in custom wordpress theme

As you all might know how important header and footer are for any site, the total navigation of any website is done on header and footers only and with the help of header and footer one can easily go to any page on any website. Although there are links at other places also but most of the people, if they visit anywhere on a link, do so through the footer.

Have you ever been asked to add some code snippets to the <header> or <footer> section of your WordPress website? By default, WordPress doesn’t provide an option to insert code in your website’s header and footer. Luckily, there is an easy solution for beginners.

In this article, we will show you how to easily add header and footer code in WordPress. The goal is to safely add the code without directly editing your WordPress theme files.

Create header.php and footer.php and inside index.php, you can import these header and footer like this.

index.php

<header>

<?php
  get_header();
  wp_head();
?>

</header>



<footer>

<?php
  wp_footer();
  get_footer();
?>

</footer>

Leave a Reply