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

A demo page is as following: https://www.wonderplugin.com/a-wordpress-page-with-no-header-menu-sidebar-and-footer-etc/

In the above demo page, I entered a shortcode of WonderPlugin Audio Player, so it only displays the audio player without any other elements.