How to add header Image in custom page

Is there an option when creating a custom page to have the header image a different image than the home page image? Basically, can I add a different header image on every page?

All the best,
Thank You!

Hi,
Sure, navigate to the Pages > Your page > to separate the content, please add a block more > add feature images on the right sidebar.

Hi, Thanks loads for all your help.
Can you please clarify the instructions and elaborate a bit more specifically on what you meant?

Thanks

Hi Abe,

Sorry for the inconvenience. First of all, please let us know what theme you are using.
For example, if you want to change the “header image” for category pages, you simply need to change the category image.

If you want to add new pages and use different header images there. You can go to the WP Dashboard > Pages > Add New section and add a new page. You’ll need to add a “More” layout block and then choose a “featured image” in the sidebar, as shown on the screenshot Screenshot by Lightshot

Thanks so much for your quick and clear response. I followed your instructions, as you can see on the screenshot attached.


However, when I publish my changes, the header image of the home page shows and not the image that I set for this page. (see additional screenshot attached)

Please advise,
All the best!

I asked the same question some time ago, regarding taskhive. I was told that you could NOT, customize the headers for the category page. I am unsure if you can customize the header for the home page. I would like to know if it is possible to have a video banner for the homepage header

Hi,

Thanks for reporting this, the bug is confirmed and we’ll fix it as soon as possible.

1 Like

Thanks!
Do you have any idea when the update will be?

It should be released within 2 weeks, but if it’s urgent we can provide a temporary fix (code snippet) - let me know if this works for you.

Yes please send me a code snippet.
Thanks!

Please try this PHP snippet but please note that it may require further customization.

add_action(
	'wp_enqueue_scripts',
	function(){
		if(!is_page() || !has_post_thumbnail()){
			return;
		}
		
		$page_image = get_the_post_thumbnail_url(null, 'large');
		
		if(!$page_image){
			return;
		}
		
		wp_add_inline_style('hivepress-core-common', ".header-hero{background-image: url(".$page_image.");}");
	}
);

The snippet doesn’t work.

Hi,

Please try this PHP snippet:

add_action(
 'wp_enqueue_scripts',
 function(){
  if(!is_page() || !has_post_thumbnail()){
   return;
  }
  
  $page_image = get_the_post_thumbnail_url(null, 'large');
  
  if(!$page_image){
   return;
  }
  
  wp_add_inline_style('hivepress-core-common', ".header-hero{background-image: url(".$page_image.") !important;}");
 }
);

Works! Thanks!