WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] SOS! Montezuma wp-blog-header.php code (17 posts)

  1. staceymarie
    Member
    Posted 1 year ago #

    Please help!

    I changed the code on the wp-blog-header.php in the FTP (without backing it up...stupid I know) and now I can getting a syntex error http://www.staceypiggott.com/.

    Can someone please help me with the code it is supposed to have in this file so I can fix it because whatever I am doing is making it worse!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

  3. staceymarie
    Member
    Posted 1 year ago #

    This is the code I have right now with the error:

    <?php
    /**
    * Loads the WordPress environment and template.
    *
    * @package WordPress
    */

    if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

    require_once( dirname(__FILE__) . '/wp-load.php' );

    wp();

    require_once( ABSPATH . WPINC . '/template-loader.php' ); <?php

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Replace this line;

    require_once( ABSPATH . WPINC . '/template-loader.php' ); <?php

    with

    require_once( ABSPATH . WPINC . '/template-loader.php' ); ?>
  5. staceymarie
    Member
    Posted 1 year ago #

    I just tried that but I am still getting an error but on line 22 now?

    So confused!

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Staceymarie,

    Look at the if condition.
    Where is it supposed to end?
    There needs to be this bracket;

    }

    Somewhere.

  7. staceymarie
    Member
    Posted 1 year ago #

    I just tried putting that on the end and it isn't working...

    What happened was I added the analytics code to the end of the file and then removed it when i realized the site was broke but it still won't work.

    Is there any way I can get the original code back?

    Thanks for your help I really appreciate it :)

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    Yes, consider my first post of reinstalling that theme.

  9. staceymarie
    Member
    Posted 1 year ago #

    Should it be in a certain format?
    #
    I have tried adding '}' to after the code and the next line but it still isn't working!

  10. staceymarie
    Member
    Posted 1 year ago #

    So will I have to rebuild the whole site again? :O

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    If you've made your modifications to a Child Theme, your modifications won't be lost.

    Otherwise, don't update it and instead try to get a copy of the original wp-blog-header.php file.
    Then upload that file to the correct directory of your website.

  12. staceymarie
    Member
    Posted 1 year ago #

    No that isn't working can only find the header,php not the wp-blog-header.php!

  13. Parse error: syntax error, unexpected '<' in /home/diginose/public_html/wp-blog-header.php on line 16

    That error should never happen as that's not a theme file. Don't edit that file, instead upload fresh copy of WordPress on top of your installation.

    Which version of WordPress are you using? If it's 3.5 then extract the files from http://wordpress.org/latest.zip and upload everything except wp-content.

  14. staceymarie
    Member
    Posted 1 year ago #

    Thanks Jan, Im trying that now!

  15. staceymarie
    Member
    Posted 1 year ago #

    It worked! Thank you soooooo much Jan! :)

  16. staceymarie
    Member
    Posted 1 year ago #

    And thank you Andrew for your suggestions :)

  17. You're welcome and I'm glad you thanked Andrew too. ;)

    Side note to Andrew: Your earlier gravatars were better. Just saying. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic