• Resolved paulevisser

    (@paulevisser)


    Hello.

    Not sure what happened.

    I tried to insert an iframe command into my functions.php file, which of course did not work. So I removed it.
    Now when the child theme is active I cannot get into word press, and O have to SFTP in and remove it.

    The error I get is:
    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:1) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-includes/pluggable.php on line 1179

    Here is my functions.php file:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
    function enqueue_parent_theme_style() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    add_filter( 'raindrops_footer_text', 'function_name' );
    
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">2014 ALL-Serve Niagara</p>';
    
    	return $html_before . $return_value ;
    }

    And my style.css:

    /*
     Theme Name:   Raindrops Child
     Template:     raindrops
     Version: 1.0
    */
    
    .hentry li{
        margin-bottom:0;
    }

    Thanks,
    Paul

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

    (@nobita)

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:1) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-includes/pluggable.php on line 1179

    this mean functions.php line 1 has html space or linebreak.

    Check your functions.php first line.

    Remove space with FTP

    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
    function enqueue_parent_theme_style() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }

    this filter is no need.

    Raindrops is auto include parent style.

    Thread Starter paulevisser

    (@paulevisser)

    ok, I did all that your recommend, and still get an error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-content/themes/raindrops-child/functions.php:1) in /home/content/p3pnexwpnas04_data02/42/2342542/html/wp-includes/pluggable.php on line 1179

    And now the site is missing all raindrops formatting. Here is the site:
    http://allserveniagara.ca/

    And my new functions.php:

    <?php
    add_filter( 'raindrops_footer_text', 'function_name' );
    function function_name( $return_value ) {
            $return_value = '';
    	$html_before = '<p style="text-align:center;color:red;">2014 ALL-Serve Niagara</p>';
    	return $html_before . $return_value ;
    }

    Used Notepad++ as recommended.

    Thanks
    Paul

    Thread Starter paulevisser

    (@paulevisser)

    Oh, bother..

    I think I found the issue.

    Notrbook++ was not set to save as UTF8 without BOM

    Changed the setting, and site is up..

    Thread Starter paulevisser

    (@paulevisser)

    All good now

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Site is white and will not load when child theme is active’ is closed to new replies.