Last active
November 27, 2017 02:55
-
-
Save braddalton/060cddc032cd7d0774efae6315ea9d5e to your computer and use it in GitHub Desktop.
Custom Splash Page Template For Genesis With Image http://wp.me/p1lTu0-gHx
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 | |
//* Template Name: Splash | |
//* Add custom body class to the head | |
add_filter( 'body_class', 'splash_add_body_class' ); | |
function splash_add_body_class( $classes ) { | |
$classes[] = 'splash'; | |
return $classes; | |
} | |
function template_image() { | |
?><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/splash.jpg" alt="" /><?php | |
} | |
add_action( 'genesis_entry_content', 'template_image' ); | |
//* Swap out genesis_entry_content hook to change image position http://wpsites.net/genesis-hooks/ | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment