HI!
Till a few hours ago I had a cool wordpress website

Unfortunatly Ive tried to change the functions.php file as explained on a website to get more sidebars and got an error message.

Ive tried to upload the original function.php file and replace it with the one Ive changed.

now I get this message: Parse error: syntax error, unexpected T_STRING....functions.php on line 2

THIS IS THE FILES PHP:

<?php

$artThemeSettings = array(
'menu.showSubmenus' => true,
'menu.homeCaption' => "Home",
'menu.showHome' => true,
'menu.topItemBegin' => "<span class=\"l\"></span><span class=\"r\"></span><span class=\"t\">",
'menu.topItemEnd' => "</span>"
);

load_theme_textdomain('kubrick');

$themename = "tropical fish";
$shortname = "art";
$default_footer_content = "<a href='#'>Contact Us</a> | <a href='#'>Terms of Use</a> | <a href='#'>Trademarks</a> | <a href='#'>Privacy Statement</a><br/>Copyright &copy; 2009 ".get_bloginfo('name').". All Rights Reserved.";
$options = array (
array( "name" => "HTML",
"desc" => sprintf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'kubrick'), 'a, abbr, acronym, em, b, i, strike, strong, span'),
"id" => "art_footer_content",
"std" => $default_footer_content,
"type" => "textarea")
);

AND ON AND ON......

I HAVE NO ACCESS TO MY WORDPRESS DASHBOARD, TO MY SITE AT ALL.

ANY IDEAS?

I DONT MIND TRYING A NEW THEME, COULD I JUST DELETE THE THEME FILES FROM MY SERVER?

ANY HELP WILL BE VERY APPREACIATED AS IM CLUELESS AT THEAT POINT AND VERY FRUSTRATED....

THANKS

    TOBI1KANOBY,

    Lets move quick then!

    This is VERY important - we can help you a lot faster if you use the [ php] [ /php] bbcode tags (without spaces) so that we can preserve the formatting, etc of the file, JUST in case as we may miss something after its stripped/converted to a message.

    This is the functions.php? If so, is it the entire file? The error reports on line 2, which is a blank line, even disregarding the PHP open tag its still a correct syntax from what I can tell.

    What other files could you have possibly modified? An unexpected T_STRING could be a lot of things, even a missing semi-colon, or closing brace somewhere.

    If you are getting an unexpected T_STRING and that line isnt an issue, try looking ABOVE that line, and if it isnt in the functions.php, you have to look into the file that is calling the functions.php.

    I also believe that its another file because you uploaded the original file to no avail!

    LIke I siad, take the functions.php and work backwards, look for any un-finished IF, WHILE, FOREACH, etc etc statements, and any commands not ending in semicolon.

      as Ive mentioned before, Im very new to this.

      I have changed the Index.php file to try and add a sidebar, as I have no real experience with php do you think I could just replace the file with an original file? would that be an option?

      if Im still strugling, as I currently dont have any access to my domain and dashboard, is there a way to change the theme and get back on buisness via my server (godaddy)?

      thanks for your help

      tobi1kanoby

        If you had changed the index.php to add a sidebar, put the original index.php back!

        In theory, if you re-download your theme and re-upload the PHP files (im sure you have somemodified graphics) it will work again.

        BUT, new at this or not, I recommend posting your index.php file, if we can help you fix it you can learn for the future.

          Hey there!
          its seems like a simple task, yet nothing changes.
          Ive exchanged both files : functions.php and index.php back to the original ones, im still getting the same message:

          Parse error: syntax error, unexpected T_STRING in ...../html/wp-content/themes/tropicalfish_wpt14/functions.php on line 2

          ?????

            Did you modify the Wordpress index.php file at all?

            (outside of your theme index) ?

              No, not to my knowledge.
              Ive only delt with the theme.php through the wordpress dashboard

                What happens if I delete all theme files from the server? would the site load up on the default theme?

                  TOBI, to be honest I am not sure.

                  If it is saying there is an unexpected string, and you have re-uploaded EVERY .php file from the theme back to your server, you have a bigger problem.

                  Especially if you havn't modified any of the files, it may be an attack, I had one once on a friends blog where it kept throwing in iframes to a .cn website with a malicous PDF.

                  Because wp has some protection(s) built in it often broke the files.

                    thanks for the help. managed to restore my previous code.
                    still strugling with the 2nd sidebar.
                    got it done but no idea how to move it from beneath sidebar1 to the left side of the content.
                    tobi.
                    http://knows-dive.com

                      Write a Reply...