Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 15, 2015 00:39
Show Gist options
  • Save braddalton/5174781 to your computer and use it in GitHub Desktop.
Save braddalton/5174781 to your computer and use it in GitHub Desktop.
Using your themes hook locations with a conditional tag for the home page, you can display an image or any content in any hook location based on specific conditions like on the home page only.
add_action('genesis_before_sidebar_widget_area', 'wpsites_home_function');
function wpsites_home_function() {
if (is_home() )
echo '<div class="sidebar-home"><img src="http://yourdomain.com/wp-content/uploads/2013/03/yourimage.png" alt="sidebar home logo" /></div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment