Created
October 16, 2018 05:38
-
-
Save jonschr/f8b153a8f61b17946dec3e2a024d157e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Add text above the loop on the main blog page | |
add_action( 'genesis_archive_title_descriptions', 'add_main_blog_description' ); | |
function add_main_blog_description() { | |
global $post; | |
// Bail if this is an archive page (not the blog page) | |
if ( is_archive() ) | |
return; | |
// Bail if it's singular | |
if ( is_singular() ) | |
return; | |
$description = get_post_meta( 1102, 'blog_description', true ); | |
$description = apply_filters( 'the_content', $description ); | |
if ( $description ) | |
echo $description; | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment