Skip to content

Instantly share code, notes, and snippets.

@lswilson
Created April 28, 2014 01:27
Show Gist options
  • Save lswilson/11359664 to your computer and use it in GitHub Desktop.
Save lswilson/11359664 to your computer and use it in GitHub Desktop.
intro text
if ( ! is_front_page() ) {
echo '<header id="header" class="col-full">';
woo_breadcrumbs();
if ( is_page( 'Get Help' ) ) {
$intro_text = drugfree_get_option( 'get_help' );
} elseif ( is_page ( 'Get Information' ) ) {
$intro_text = drugfree_get_option ( 'get_information' );
} elseif ( is_page ( 'Get Involved' ) ) {
$intro_text = drugfree_get_option ( 'get_involved' );
} elseif( is_page ( 'Community' ) ) {
$intro_text = drugfree_get_option( 'community' );
} else {
$intro_text = drugfree_get_option ( 'post_intro' );
}
if ( current_user_can( 'manage_options' ) ) {
$intro_text .= ' <a href="'. add_query_arg( 'page', 'drugfree_options', admin_url() ) .'">(edit)</a>';
}
// Grab the post type header
drugfree_post_type_header( get_the_title(), $intro_text );
echo '</header>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment