• Resolved ORECoop

    (@orecoop)


    I’m knocking my head against the wall here. I’ve searched and read but I still don’t have a solution.

    This is this error that is live at http://www.orec.ca. It happened after deploying my local site to the server. I don’t get the error on my local server.

    Warning: Cannot modify header information – headers already sent by (output started at /home/retrofi8/public_html/wp-content/themes/sahifa-child/functions.php:1) in /home/retrofi8/public_html/wp-content/plugins/wpfront-notification-bar/classes/class-wpfront-notification-bar.php on line 57

    As far as I read, the first file mentioned is at fault but everything looks good since I just copy and pasted the code from the codex to create my child theme.

    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    ?>

    None of the much talked about files have whitespaces. What should I do now?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    just to be double-sure delete the ?> from functions.php

    If that doesn’t fix it, disable the plugin wpfront-notification-bar. You can do that by renaming its directory from wpfront-notification-bar/ to wpfront-notification-bar.disabled/

    Thread Starter ORECoop

    (@orecoop)

    Thanks sterndata.

    I removed the ?> and it didn’t do anything. I then renamed the plugin directory. The error disappeared on the frontend but the wp-admin page is blank. Any thoughts why that is?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    because there’s another error somewhere 🙁

    going to /wp-admin fails, but going to /wp-login.php works so I suspect you have an error in your .htaccess file. How are you hosting this site?

    Thread Starter ORECoop

    (@orecoop)

    The site is hosted on SiteGround. Can I simply load the .htaaccess from my most recent backup onto this version of the site through FTP? Is that safe to do?

    Thread Starter ORECoop

    (@orecoop)

    I rewrote the hta access and it worked! Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot modify header information – child functions.php I DID SEARCH!’ is closed to new replies.