Skip to content

Instantly share code, notes, and snippets.

@gustavoguichard
Created November 6, 2012 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gustavoguichard/4026032 to your computer and use it in GitHub Desktop.
Save gustavoguichard/4026032 to your computer and use it in GitHub Desktop.
A simple page.php
<?php get_header(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article>
<header>
<?php $page_quoted_title = get_post_meta($post->ID, 'page_quoted_title', true);?>
<h2><?php if($page_quoted_title){echo nl2br($page_quoted_title);} else {the_title();} ?></h2>
</header>
<?php the_content();?>
</article>
<?php $extra_content = get_post_meta($post->ID, 'extra_content', true);?>
<?php if($extra_content):?>
<aside id="extra_content"><?php echo $extra_content;?></aside>
<?php endif;?>
<?php endwhile;?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment