Skip to content

How to remove header & footer In wordpress post & page.

    Remove Header & Footer In any page or post in WordPress

    By using a php code

    There are many ways to remove header & footer In wordpress page & post.

    If you want to  remove Header & Footer In WordPress page then you can use below php template & upload your Hosting file manager in your active theme folder.

    <?php
    /**
    * Template Name: Clean Page
    * This template will only display the content you entered in the page editor
    */
    ?>
    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php wp_head(); ?>
    </head>
    <body class="cleanpage">
    <?php
    while ( have_posts() ) : the_post(); 
    the_content();
    endwhile;
    ?>
    <?php wp_footer(); ?>
    </body>
    </html>

     

    Open your notepad, copy & paste above code & create a file naming “cleanpage.php”

    & upload this file In your active theme folder.

    when you will create any post (post type-page) then navigate to page attribute & select “clean page template”

    Header & Footer will remove from that page.

    This Code will not remove header & footer in post page.

     

    By using theme:

    There are many theme which give options to remove header & footer In any post/page.

    By using NEVE Theme-

    When you edit post by using neve theme then you will get option to hide header & footer in sidebar.

    remove header & footer

    By using Ocean wp theme-

    In this theme you will also get lot of options to hide header & footer In any post/page.

     

    Comment If you get any trouble to hide header & footer.Our team will help you freely.

    Leave a Reply

    Your email address will not be published.