Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Last active September 21, 2015 04:51
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 reasonstousegenesis/7dfb6a8cc9c712e12ab3 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/7dfb6a8cc9c712e12ab3 to your computer and use it in GitHub Desktop.
Insert extra content before the main Post or Page content
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Insert extra content before the main Post or Page content
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-before-entry-content/
*/
add_action( 'genesis_before_entry_content', 'rtug_before_entry_content' );
function rtug_before_entry_content() {
echo '<p>A piece of extra content before the main Post content</p>';
}
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Insert extra content before the main Post or Page content (XHTML)
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-before-entry-content/
*/
add_action( 'genesis_before_post_content', 'rtug_before_entry_content' );
function rtug_before_entry_content() {
echo '<p>A piece of extra content before the main Post content</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment