Job2 Street

Monday, December 4, 2017

How to create a WordPress page without header

https://www.wpeka.com/modify-wordpress-theme-header-and-footer.html

How to create a WordPress page without header, menu, sidebar and footer?

In this tutorial, we will guide you how to create a WordPress page with no header, menu, sidebar and footer etc. The only content will be what you have entered in the page editor.

Step 1 - Create a WordPress page template file

In your local computer, create a text file, copy the following code and save it as "page-cleanpage.php".
<?php
/**
 * Template Name: Clean Page
 * This template will only display the content you entered in the page editor
 */
?>
 
<html <?php language_attributes(); ?> class="no-js">
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php wp_head(); ?>
</head>
<body>
<?php
    while ( have_posts() ) : the_post();   
        the_content();
    endwhile;
?>
<?php wp_footer(); ?>
</body>
</html>

Step 2- Upload the file to your WordPress theme folder

FTP the created file page-cleanpage.php to your WordPress theme folder, which is wp-content -> themes -> yourthemename.

Step 3 - Select the template in the WordPress page editor

In the WordPress page editor, Page Attributes tab, choose Clean Page from the Template drop-down list.
WordPress page without header, menu, sidebar and footer
In the above demo page, I entered a shortcode of WonderPlugin Audio Player, so it only displays the audio player without any other elements.

1 comment:

  1. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. ds4windows website

    ReplyDelete

K-Play

kPlaylist - get your music online

The player will show in this paragraph

2 3

IkimFM

speaker music speaker