Last active
December 23, 2015 01:59
-
-
Save robneu/6563453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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