• Hi nobita!

    I’ve got a custom header I want to use for certain pages on my site. I’ve used Edit Page and tried setting the header via the controls at the bottom of the page I want to modify, but this sets the header for the entire site. How do I have random headers for half the pages on my site and a single custom header for other pages?

    I’ve searched these forums for assistance with this issue, but none of the suggestions or code seems to help. Any suggestions you have would be greatly appreciated!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Theme Author nobita

    (@nobita)

    Hi

    Please try Front Page Template

    Thank you.

    Thread Starter Ray Burtoff

    (@rburtoff)

    What is Front Page Template? Is this a setting for Raindrops?

    Theme Author nobita

    (@nobita)

    What is Front Page Template?

    Create new static page.

    Please look for page attributes meta box

    Please try to open the drop-down of Template If found

    Select Front Page Template

    Save done

    Thread Starter Ray Burtoff

    (@rburtoff)

    I tried setting the page to use the Front Page Template but it broke my page. The page now displays as two columns with the content on the left and the custom header on the right, instead of the custom header being at the top as a banner. Also, changing the header for this page still changes the header for the entire site.

    Theme Author nobita

    (@nobita)

    Sorry

    Please try replace header.php below

    https://gist.github.com/tenman/49b9389ac7b4be5356e5

    (Copy with Raw button).

    Thank you.

    Thread Starter Ray Burtoff

    (@rburtoff)

    Received an error.

    In the child theme:
    Fatal error: Call to undefined function raindrops_link_unique_text() in /home2/cfhonet/public_html/cfho_dev/wp-content/themes/raindrops-child/header.php on line 7

    In the main Raindrops theme:
    Fatal error: Call to undefined function raindrops_link_unique_text() in /home2/cfhonet/public_html/cfho_dev/wp-content/themes/raindrops/header.php on line 7

    Theme Author nobita

    (@nobita)

    If using child theme, Please using filter

    add child theme / functions.php

    <?php
    add_action( 'after_setup_theme', 'my_custom_init' );
    
    function my_custom_init() {
    	add_filter( 'raindrops_header_image_elements', 'my_custom_header_image', 11 );
    	add_filter( 'raindrops_header_image_home_url', 'my_custom_header_image', 11 );
    }
    
    function my_custom_header_image( $header ) {
    
    	$html = '
    <div class="line">
    	<div class="unit size1of2">
    	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    	</div>
    	<div class="unit size1of2">%1$s</div>
    </div>';
    
    	return sprintf( $html, $header );
    }
    ?>

    thank you for your patience

    Theme Author nobita

    (@nobita)

    Received an error.

    In the child theme:
    Fatal error: Call to undefined function raindrops_link_unique_text() in /home2/cfhonet/public_html/cfho_dev/wp-content/themes/raindrops-child/header.php on line 7

    In the main Raindrops theme:
    Fatal error: Call to undefined function raindrops_link_unique_text() in /home2/cfhonet/public_html/cfho_dev/wp-content/themes/raindrops/header.php on line 7

    Yesterday, for the reproduction of this error, we have been tested to use the child theme.

    And, because this error is reproduced, it was presented a code using the filter.

    Since the big issues that for the theme of such a problem has occurred,

    I’ve tried to again test to reproduce, did not cause an error.

    This problem, then also please tell me whether you are continuing

    Thank you.

    Thread Starter Ray Burtoff

    (@rburtoff)

    Haven’t had a chance to work on this yet; I’ll post again when I have.

    Thread Starter Ray Burtoff

    (@rburtoff)

    I added the code to the “functions.php” file in my child theme and it no longer throws an error, but the custom header shows up next to the standard header (as if the headers had two columns). Once the code is added it also makes the change on every page. Am I doing something wrong?

    Theme Author nobita

    (@nobita)

    but the custom header shows up next to the standard header (as if the headers had two columns).

    If possible give me a screenshot

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom Header For Certain Pages’ is closed to new replies.