Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created September 30, 2014 17:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/317a82e09a9c6aad860c to your computer and use it in GitHub Desktop.
Save billerickson/317a82e09a9c6aad860c to your computer and use it in GitHub Desktop.
<?php
/**
* Intro Content
*
*/
function be_intro_content() {
if( is_page() )
$intro = get_post_meta( get_the_ID(), 'be_intro_content', true );
if( is_home() )
$intro = get_post_meta( get_option( 'page_for_posts' ), 'be_intro_content', true );
if( $intro )
echo '<div class="intro-content">' . apply_filters( 'the_content', $intro ) . '</div>';
}
add_action( 'genesis_before_loop', 'be_intro_content' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment