Skip to content

Instantly share code, notes, and snippets.

@salcode
Created June 14, 2016 10:15
Show Gist options
  • Save salcode/442d39e1d16a3063f8cb248cff27b42e to your computer and use it in GitHub Desktop.
Save salcode/442d39e1d16a3063f8cb248cff27b42e to your computer and use it in GitHub Desktop.
Genesis home.php template to display content before posts on blog page.
<?php
/**
* File for home.php
*
* Blog page template with page description before blog posts.
*
* @package example;
*/
add_action( 'genesis_before_loop', 'fe_home_genesis_before_loop' );
/**
* Output page content on Blog Post page
*/
function fe_home_genesis_before_loop() {
// if page !== page 1 return;
$page_id = get_queried_object_id();
echo ' Here is the content from ';
echo __FUNCTION__;
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment