Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active December 23, 2015 01:59
Show Gist options
  • Save robneu/6563453 to your computer and use it in GitHub Desktop.
Save robneu/6563453 to your computer and use it in GitHub Desktop.
<?php
/**
* Displays a signature image after the post content in
* any Genesis Child theme.
*
* @author FAT Media <http://youneedfat.com>
* @copyright Copyright (c) 2013, FAT Media, LLC
* @license GPL-2.0+
*/
add_action( 'genesis_before_loop', 'prefix_include_signature' );
function prefix_include_signature() {
//* Use the correct hook no matter what theme is enabled.
if ( ! genesis_html5() ) {
add_action( 'genesis_after_post_content', 'prefix_display_signature', 10 );
} else {
add_action( 'genesis_entry_footer', 'prefix_display_signature', 10 );
}
// Display the signature image
function prefix_display_signature() {
// Display only on single posts, archives, and the home page.
if ( is_single() || is_archive()|| is_front_page() ) {
echo'<img src="http://yourdomain.com/your-image.png" alt="Signature" title="Signature" />';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment