- This topic has 2 replies, 2 voices, and was last updated 10 years, 2 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
How to replace the Prose background header image with a real image logo using simple hooks or custom code?
I want to do this as the current header doesn't look to well if shown on a mobile device and also because a background image isn't used when sharing a website for example with Facebook.
a. Tried this approach but couldn't get it to work. http://blackhillswebworks.com/2013/05/10/how-to-replace-the-studiopress-background-header-image-with-a-real-image-logo/
b. Tried this simple hooks solutions which is to unhook genesis_do_header function from Header hooks and to add this code:
(source: http://www.magnet4marketing.net/2010/12/18/how-to-add-custom-header-logo-to-studiopress-premium-wordpress-themes/ )
1. Is it possible somehow to get the SITE-URL and SITE DESCRIPTION filled in 'automatically' for example with some Genesis function like genesis_title? If so what is the code?
2. This approach uses simple hooks, but then I'm dependent on simple hooks. Can this be done with custom code, and if so how should this code look like?
I just tried to recreate the problem but discovered that your code is working and doing exactly what I wanted to do in custom code Prose.
In step 4 I chose a location not under the theme folder but above. So I just saw that your code adds the stylesheet directory! I overlooked that so that's why the image didn't show.
img src="'. get_stylesheet_directory_uri() .'/images/logo.png"
Thanks for the help.
Both solutions help. But I prefer the custom code approach.
© 2023 WPEngine, Inc.