Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created July 16, 2013 17:39
Show Gist options
  • Save jameskoster/6010878 to your computer and use it in GitHub Desktop.
Save jameskoster/6010878 to your computer and use it in GitHub Desktop.
Highwind - Add your own header image
add_action( 'highwind_site_title_link', 'jk_custom_header_image' );
function jk_custom_header_image() {
?>
<img src="path/to/your/image.png" class="avatar" />
<?php
}
@Mixcreations
Copy link

im trying to work this out how to place and edit it etc. can someone please provide a step by step before i work it out? thanks

@gsoundsgood
Copy link

you go to: ...wp-admin/theme-editor.php

look for your "functions.php" file

at the bottom of the file, you just paste the snippet you see above (changing the image path with the path to your image).

Apparently, this brings in two avatars, the old automatic gravatar and the one that was just added. In order to remove the old gravatar, at the bottom of functions.php, you need to paste also this:

add_filter( 'highwind_header_gravatar', '__return_false' );

then you save, and you're good to go.

Just remember that you'll need to do this every time the theme gets updated (of course, you could also create a child theme and make this permanent).

@radioactives
Copy link

But where's the functions.php?

@ld1975
Copy link

ld1975 commented Mar 21, 2014

Ive create a child-theme for the highwind template. in the child-theme folder I´ve a folder named "images". in this folder Ive the avatar picture. I change the functions.php as you write above, and I save the functions.php in the child-theme folder. but the picture don`t disapear. My path ist
must the picture have a special size? you can see the workarea here http://work.andrea-fleuchaus-stuttgart.de/

@amitdave81
Copy link

Adding the above code snippet in functions.php adds the image but doesn't remove the existing img tag. Better is to add and avatar plugin and then add the picture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment