Support » Theme: raindrops » Custom header Image on Each Page

  • I am using Raindrops theme,at I have two pages that are for hunting I need to have a different header image banner on those two pages, different than for the CHL Pages. How do I do that? I am not familiar with editing php or code on wordpress so things need to be explained pretty clear. Thanks.

Viewing 1 replies (of 1 total)
  • Theme Author nobita


    Hi acscom

    Please try below code.

    Add to functions.php first line <?php before.

    add_filter( 'raindrops_header_image_css','my_custom_header');
    function my_custom_header( $style ){
    /* your settings */
    	$apply_pages = array( 2152 ); // page id or slug or title  ex array( 42, 'about-me', 'About Me And Joe' )
    /* your settings end */
    	if( is_page( $apply_pages ) ){
    	/* your settings */
    		$img = '';
    		$height = ''; //example value 300px ,if you need height, please add !important
    		$style = 'border:3px solid red;	box-sizing: border-box;'; //ifyou need own style
    	/* your settings */
    		$css = '#%1$s{background-image:url(%2$s )!important;height:%3$s;%4$s}';
    		$css = sprintf( $css,
    					esc_url( $img ),
    					esc_html( $height ),
    					esc_html( $style )
    		return $css;
    	return $style;

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom header Image on Each Page’ is closed to new replies.