Skip to content

Instantly share code, notes, and snippets.

@sareiodata
Last active March 21, 2024 08:29
Show Gist options
  • Save sareiodata/3ad752f0f6cd08023196 to your computer and use it in GitHub Desktop.
Save sareiodata/3ad752f0f6cd08023196 to your computer and use it in GitHub Desktop.
Empty WordPress page template
<?php
/**
* Template Name: Blank Template
*
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<div id="content" class="site-content">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- #content -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
@nathos7
Copy link

nathos7 commented Feb 18, 2021

Thanks a lot !

@ovicko
Copy link

ovicko commented Nov 6, 2022

Helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment