Support » Themes and Templates » SOS! Montezuma wp-blog-header.php code

  • Resolved staceymarie


    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

    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!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Andrew Nevins


    Forum moderator

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

    * Loads the WordPress environment and template.
    * @package WordPress

    if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

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


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

    Moderator Andrew Nevins


    Forum moderator

    Replace this line;

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


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

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

    So confused!

    Moderator Andrew Nevins


    Forum moderator


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



    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 🙂

    Moderator Andrew Nevins


    Forum moderator

    Yes, consider my first post of reinstalling that theme.

    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!

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

    Moderator Andrew Nevins


    Forum moderator

    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.

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

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    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 and upload everything except wp-content.

    Thanks Jan, Im trying that now!

    It worked! Thank you soooooo much Jan! 🙂

    And thank you Andrew for your suggestions 🙂

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘SOS! Montezuma wp-blog-header.php code’ is closed to new replies.