Since it’s just modifying the header image, you can call it in your template just as you would a regular header image (since that’s what it is). I don’t include instructions for that, since it’s a WordPress core thing, not something implemented by the plugin itself.
The other parts of your question are relating to post thumbnails, which are something different and not directly related to header images.
Hi Ryan,
Thanks for your replay, but this is not the answer I expected – it feels a bit blunt, to be honest. But maybe I was not clear enough in my original post about what I’m actually asking.
Basically I’m trying to use your plugin with a custom header template part; I think many more users like me would want to know how to do this.
If I encounter a problem in WordPress, I alwasy try to think of a solution that would benefit not only me, but all users with the same problem. So I think it would improve your plugin if you could implement a shortcode to load the set custom header image at any place, thus also in a custom header template part.
The theme of my website is using it’s own header template part, so by default it does not work with your plugin. But by default the posts and pages did not show any header background image, until I modified the header template part to load the featured image as background. So it should be not too difficult to extend this with some code from your plugin for the custom header image as well.
I know that the featured image URL is loaded by ‘the_post_thumbnail_url(‘post-background’)’ in the code of the header template part. I’m now just looking for a simple code snippet to replace this with the URL of the set custom header image and to include a check if a custom header image is set.
I’ve been looking for this for quite a while now, but just can’t find out yet (still improving/learning my coding skills…). And since you are the author of the plugin, I suppose it’s a piece of cake for you to give me this snippet or at least put me in the right direction. It would save me a lot of time and trouble, would be much appreciated!
The plugin is intended for adding unique headers into the existing WordPress header system, not for implementing the WordPress header system itself. Such a plugin may be useful, but it would be a different plugin with a different purpose.
Thanks, that’s a clear answer. Just for the record: I don’t want to implement the WordPress header system itself with your plugin, that’s already in place – be it a custom template part of my theme.
I still think it’s a pity that your plugin only works with the default WP header system, while it should be so easy to extend it with use for a custom header template part. It could make your plugin the all-round custom header solution that can work with every theme that has a header system in place.
But I respect your choice not to do this, it’s your plugin after all. So in this case I will look for a different plugin.
It does (in theory) work with every theme that uses the WordPress header system. It doesn’t matter if the header is implemented within a template part or not; whether code is loaded via a template part or not should be irrelevant.
-
This reply was modified 8 years, 1 month ago by
Ryan Hellyer.
Well, thanks for your explaining (I learned something from it), but in the end the feeling remains that you do not really want to help me solve this issue. I think you and I think differently about helping someone out. I respect that.
You can close this topic for now, but just for the record: it’s not (yet) resolved…
This is a topic for the Unique Headers plugin. Your question is not about the plugin, it’s a request for assistance with how to use the WordPress header system.
I am here to help with the plugin. I’m not a help desk for generic WordPress questions 😉