Skip to content

Instantly share code, notes, and snippets.

@carasmo
Last active March 16, 2016 15:50
Show Gist options
  • Save carasmo/cb17f3077bb5081795d1 to your computer and use it in GitHub Desktop.
Save carasmo/cb17f3077bb5081795d1 to your computer and use it in GitHub Desktop.
Genesis child theme: Add div and image inside .site-header, before logo just inside the .wrap - See ChristinaCreativeDesign.com for more Genesis goodness.
<?php
//* don't use
// this goes inside your functions.php file. Check your functions file if a different priority is required.
// use FTP and a code editor. Change the prefix_ in the two locations to your theme prefix. Do not use dashes or hyphens.
/** ====================================================================================
* Add div and image inside .site-header, before logo just inside the .wrap
==================================================================================== **/
function prefix_add_image_to_header() {
echo '<div class="some-class"><img src="' . get_site_url() . '/path/to/image.png" alt="Change this" /></div>';
}
add_action( 'genesis_header', 'prefix_add_image_to_header', 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment