Skip to content

Instantly share code, notes, and snippets.

@Dillie-O
Last active August 29, 2015 14:01
Show Gist options
  • Save Dillie-O/d0319e5f794857cc954c to your computer and use it in GitHub Desktop.
Save Dillie-O/d0319e5f794857cc954c to your computer and use it in GitHub Desktop.
WordPress template that displays just the content. No headers/footers/widgets are rendered.
<?php
/**
Template Name: Content Only
*/
?>
<html>
<head>
<title><?php wp_title( '|', true, 'right' ); bloginfo('url'); ?></title>
<style>
html,body,div,iframe {height:100%;}
p {position:relative;overflow:hidden;}
iframe {border:none;width:100%;}
body {margin:0;padding:0;}
</style>
</head>
<body>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); endwhile; ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment