Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Last active August 29, 2015 14:20
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/700385dd16b4236dc60e to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/700385dd16b4236dc60e to your computer and use it in GitHub Desktop.
Add content before the entry with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Add content before the entry with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-before-entry/
*/
add_action( 'genesis_before_entry', 'rtug_before_entry' );
function rtug_before_entry() {
echo '<p>A line of text at the top of the entry</p>';
}
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Add content before the entry with Genesis (XHTML)
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-before-entry/
*/
add_action( 'genesis_before_post', 'rtug_before_entry' );
function rtug_before_entry() {
echo '<p>A line of text at the top of the entry</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment