As the title suggests, I'd like a page template to have NO navigation and NO footer.

All my page templates have this:

   * Template Name: Blah Blah

 if (!defined('ABSPATH'))
  exit; // Exit if accessed directly

But if I remove the above code then the entire page won't work.

  • downvoted and close voted as this will be totally theme dependent. (bravokeyl answer is really the best answer possible but it is only the starting point) Aug 8, 2017 at 7:34

1 Answer 1


Don't remove get_header().

Duplicate the header.php to header-{custom-name}.php, let's say (header-nonavfooter.php) then in the template file replace get_header() with get_header('nonavfooter').

In the new header file (header-nonavfooter.php) remove the code related to navigation.

Do the same for the footer.php also(Create a new footer.php and remove the footer parts that you don't need), remember not to remove wp_footer() available in footer.php.

  • the "get_header('nonavfooter')" idea worked great - but I can't seem to find how and where the footer is called. * sorry - i figured it out :)
    – Henry
    Aug 9, 2017 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.