Skip to content

Instantly share code, notes, and snippets.

@iansvo
Created April 17, 2017 17:54
Show Gist options
  • Save iansvo/90e6ac0e5574dc550a83a5584a7edafc to your computer and use it in GitHub Desktop.
Save iansvo/90e6ac0e5574dc550a83a5584a7edafc to your computer and use it in GitHub Desktop.
Add a sub-headline to WordPress Twenty-Seventeen Theme
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<h2 class="entry-subheadline">
<?php the_field('sub_headline'); ?>
</h2>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment