Skip to content

Instantly share code, notes, and snippets.

@jonschr
Created October 16, 2018 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschr/f8b153a8f61b17946dec3e2a024d157e to your computer and use it in GitHub Desktop.
Save jonschr/f8b153a8f61b17946dec3e2a024d157e to your computer and use it in GitHub Desktop.
<?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