Skip to content

Instantly share code, notes, and snippets.

@joetower
Created October 14, 2016 16:08
Show Gist options
  • Save joetower/a69a396396445eaa850f557dddcf8e49 to your computer and use it in GitHub Desktop.
Save joetower/a69a396396445eaa850f557dddcf8e49 to your computer and use it in GitHub Desktop.
WordPress content page full example
<?php
/**
* The template used for displaying page content
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('full'); ?>>
<header class="entry-header limiter">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<!-- ACF component fields -->
<?php if ( get_the_content()) : ?>
<div class="entry-content content-body">
<?php
the_content();
?>
</div><!-- .entry-content -->
<?php endif; ?>
<?php if ( has_post_thumbnail()) : ?>
<figure class="featured-image full">
<?php the_post_thumbnail('featured-image-large'); ?>
</figure>
<?php endif; ?>
<?php get_template_part( 'template-parts/flexible-content' ); ?>
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment