Support » Fixing WordPress » Error message "Parse error"

  • After I inserted a code into the function.php file my site will not open. The following code is the error message.

    Parse error: syntax error, unexpected ‘<‘ in /home/content/54/7433054/html/wp-content/themes/thejournal/functions.php on line 28

    I have the function.php file open but I can’t edit posts or click off the site or I won’t be able to access the function.php file again.

    Any help fixing this would be great. The original code that created this issue was supplied by WordPress to tweak the WooDojo tabbed widget.

Viewing 15 replies - 1 through 15 (of 17 total)
  • It’s because there is a “<” in the code that shouldn’t be there, maybe you pasted <?php by accident.

    If you have edited the code in WP, you are not going to be able to make the change in there. You will have to overwrite the file using an FTP client.

    I can’t really tell you the issue if I can’t see the code

    Below is the code as it currently stands in the function.php file:

    /*———————————————————————————–*/
    /* Start WooThemes Functions – Please refrain from editing this section */
    /*———————————————————————————–*/

    // Set path to WooFramework and theme specific functions
    $functions_path = TEMPLATEPATH . ‘/functions/’;
    $includes_path = TEMPLATEPATH . ‘/includes/’;

    // WooFramework
    require_once ($functions_path . ‘admin-init.php’); // Framework Init

    // Theme specific functionality
    require_once ($includes_path . ‘theme-options.php’); // Options panel settings and custom settings
    require_once ($includes_path . ‘theme-functions.php’); // Custom theme functions
    //require_once ($includes_path . ‘theme-plugins.php’); // Theme specific plugins integrated in a theme
    //require_once ($includes_path . ‘theme-actions.php’); // Theme actions & user defined hooks
    require_once ($includes_path . ‘theme-comments.php’); // Custom comments/pingback loop
    require_once ($includes_path . ‘theme-js.php’); // Load javascript in wp_head
    require_once ($includes_path . ‘sidebar-init.php’); // Initialize widgetized areas
    require_once ($includes_path . ‘theme-widgets.php’); // Theme widgets

    /*———————————————————————————–*/
    /* End WooThemes Functions – You can add custom functions below */
    /*———————————————————————————–*/

    <?php?>

    Any help sorting this out would be immensely appreciated. I thought at this point I would be able to add the code without any issues but I will have to resort to paying a WP expert to tweak certain files on my site.

    The code above is the whole code as it appears in the function.php file.

    If that is exactly how your functions.php file looks, then the problem is at the bottom. The file should look like this…

    <?php

    *** CODE ETC HERE ***

    ?>

    And from what I see your file looks like this…

    *** CODE HERE ***

    <?php?>

    I hope this helps

    So I should add <?php at the top?

    So this would be the correct entire code?:

    <?php
    /*———————————————————————————–*/
    /* Start WooThemes Functions – Please refrain from editing this section */
    /*———————————————————————————–*/

    // Set path to WooFramework and theme specific functions
    $functions_path = TEMPLATEPATH . ‘/functions/’;
    $includes_path = TEMPLATEPATH . ‘/includes/’;

    // WooFramework
    require_once ($functions_path . ‘admin-init.php’); // Framework Init

    // Theme specific functionality
    require_once ($includes_path . ‘theme-options.php’); // Options panel settings and custom settings
    require_once ($includes_path . ‘theme-functions.php’); // Custom theme functions
    //require_once ($includes_path . ‘theme-plugins.php’); // Theme specific plugins integrated in a theme
    //require_once ($includes_path . ‘theme-actions.php’); // Theme actions & user defined hooks
    require_once ($includes_path . ‘theme-comments.php’); // Custom comments/pingback loop
    require_once ($includes_path . ‘theme-js.php’); // Load javascript in wp_head
    require_once ($includes_path . ‘sidebar-init.php’); // Initialize widgetized areas
    require_once ($includes_path . ‘theme-widgets.php’); // Theme widgets

    /*———————————————————————————–*/
    /* End WooThemes Functions – You can add custom functions below */
    /*———————————————————————————–*/

    ?>

    Yep, that’s right!

    Still getting the error message. This sucks. I have to overwrite the file using an FTP client?

    Yes, because of the error the WP interface will not work. So you have to use FileZilla or something to overwrite the file.

    Are there directions online? I really have no clue about how to do this. I really appreciate the help. This experience is maddening.

    1. Download FileZilla
    2. Connect to your server using FTP login details provided by your host.
    3. Go to your theme’s folder i.e. /wp-content/themes/YOUR THEME
    4. Then download your functions.php file and open with notepad
    5. Make the change to the file as above
    6. Replace the file with your correct copy

    That should do it

    Sorry for my mundane question but can I contact you through email about paying you to do this if I provide the login info? I don’t quite trust myself to do this.

    No problem. Go to my website Here and you will see an email address at the top next to the logo.

    Actually I called GoDaddy and you wouldn’t be able to do anything with it because I don’t know my FTP password.

    Oh no! Can they not reset it for you?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Error message "Parse error"’ is closed to new replies.