• Hi all

    My small issue concerns the Hemingway SEARCH widget…..the search functions perfectly well, however when the SEARCH page results pop up I cannot edit the header which is set by default. I would like to add a solid colour and remove the default header.

    I have also installed a plugin that allows me to add a custom header to pages created in Hemingway, however I cannot find a way to edit the SEARCH in the theme.

    Thanks and Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @maltacommandww2,

    The cover photo on the search results page is the same as the cover photo on the rest of the site, which you can set at Appearance → Customize.

    If you want to modify it on the search page specifically, you’ll need to create a child theme and add code in functions.php that filters the value of the header_image theme mod on the search page.

    Something like this:

    add_filter( 'theme_mod_header_image', function() {
    
    	return ''; // Add the URL of the image you want to use within the quotation marks here.
    
    } );

    — Anders

    Thread Starter maltacommandww2

    (@maltacommandww2)

    Dear Anders,

    Thanks for your message

    Although I managed to grasp some basic functions on WP, unfortunately I’m not very technical with what you have mentioned above.

    I’m not familiar with child theme nor with .php…..so if there may be a plugin to simplify the process or you can assist by providing step-wise instructions I’d appreciate.

    Looking forward to here from you since we are to launch the website soon.
    Regards

    Kurt

    Theme Author Anders Norén

    (@anlino)

    Hi @maltacommandww2,

    You can find instructions on how to create a child theme here: https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    Edit: I noticed that I missed adding the is_search() conditional in the code I posted in my previous reply. This is the code you’re looking for:

    add_filter( 'theme_mod_header_image', function( $image_url ) {
    
    	if ( is_search() ) {
    		$image_url = ''; // Add the URL of the image you want to use on search within the quotation marks here.
    	}
    
    	return $image_url; 
    
    } );

    — Anders

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SEARCH page cover photo’ is closed to new replies.