• 2 days ago I was trying to edit my functions.php file for the theme that’s installed.

    I ended up with a site that’s not working at all and displays this string:

    Parse error: syntax error, unexpected T_STRING in /home/skinner7/public_html/flyakite.org/wp-content/themes/socialeyes/functions.php on line 11

    I tried replacing the the functions.php page via cpanel and it hasn’t worked. I tried replacing the main theme and child theme that I’m using and it still doesn’t work. Is there an option that doesn’t include a complete wordpress reinstall?

    I’d appreciate if anyone can give me a quick answer since the site has been down for 2 days now.

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Could you show complete code of functions.php file?

    rename the theme folder name (socialeyes) to something else (using ftp or cpanel)
    this should re-activate the default theme and get you back into the dashboard;
    you might then be able to edit functions.php and repair it;

    if you want to replace functions.php of your theme with an unedited copy, make sure you have uploaded the right functions.php to the right location on the server.

    Thread Starter patriciaskinner

    (@patriciaskinner)

    I tried this: i deleted social eyes in the end and uploaded a fresh file. I also uploaded the framework, genesis. I’m totally at a loss now. Will I have to reinstall WordPress?

    Thanks so much for your help.

    Thread Starter patriciaskinner

    (@patriciaskinner)

    <?php
    // Start the engine
    require_once(TEMPLATEPATH.’/lib/init.php’);
    require_once(CHILD_DIR.’/lib/custom-header.php’);
    require_once(CHILD_DIR.’/lib/style.php’);

    // Child theme (do not remove)
    define(‘CHILD_THEME_NAME’, ‘Social Eyes Theme’);
    define(‘CHILD_THEME_URL’, ‘https://www.studiopress.com/themes/socialeyes&#8217;);

    // Add support for custom background
    add_custom_background();

    // Add new image sizes
    add_image_size(‘Homepage Featured’, 600, 300, TRUE);
    add_image_size(‘Homepage Thumbnail’, 110, 110, TRUE);

    // Customize the post info function
    add_filter(‘genesis_post_info’, ‘post_info_filter’);
    function post_info_filter($post_info) {
    if (!is_page()) {
    $post_info = ‘[post_date] by [post_author_posts_link] [post_comments] [post_edit]’;
    return $post_info;
    }
    }

    // Customize the post meta function
    add_filter(‘genesis_post_meta’, ‘post_meta_filter’);
    function post_meta_filter($post_meta) {
    if (!is_page()) {
    $post_meta = ‘[post_categories] · [post_tags]’;
    return $post_meta;
    }
    }

    // Add after post ad widget area on single post
    add_action(‘genesis_after_post_content’, ‘socialeyes_after_post_ad’, 9);
    function socialeyes_after_post_ad() {
    if ( is_single() ) {
    echo ‘<div class=”after-post-ad”>’;
    dynamic_sidebar(‘after-post-ad’);
    echo ‘</div>’;
    }
    }

    // Add widgeted footer section
    add_action(‘genesis_before_footer’, ‘socialeyes_footer_widgets’);
    function socialeyes_footer_widgets() {
    require( CHILD_DIR . ‘/footer-widgets.php’ );
    }

    // Customize the footer section
    add_filter(‘genesis_footer_creds_text’, ‘socialeyes_footer_creds_text’);
    function socialeyes_footer_creds_text($creds) {
    return __(‘Copyright’, ‘genesis’) . ‘ [footer_copyright] [footer_childtheme_link] ‘ . __(‘on’, ‘socialeyes’) . ‘ [footer_genesis_link] · [footer_wordpress_link] · [footer_loginout]’;
    }

    // Register widget areas
    genesis_register_sidebar( array(
    ‘name’=>’Homepage’,
    ‘id’ => ‘homepage’,
    ‘description’ => ‘This is the content section of the homepage.’
    ) );
    genesis_register_sidebar( array(
    ‘name’=>’After Post Ad’,
    ‘id’ => ‘after-post-ad’,
    ‘description’ => ‘This is the section after a post for an ad.’
    ) );
    genesis_register_sidebar( array(
    ‘name’=>’Footer #1’,
    ‘id’ => ‘footer-1’,
    ‘description’ => ‘This is the first column of the footer section.’
    ) );
    genesis_register_sidebar( array(
    ‘name’=>’Footer #2’,
    ‘id’ => ‘footer-2’,
    ‘description’ => ‘This is the second column of the footer section.’
    ) );
    genesis_register_sidebar( array(
    ‘name’=>’Footer #3’,
    ‘id’ => ‘footer-3’,
    ‘description’ => ‘This is the third column of the footer section.’
    ) );

    Thread Starter patriciaskinner

    (@patriciaskinner)

    I have tried everything you suggest and I’m still getting this error. Can anyone else suggest anything more?

    Thanks.

    Did you do this,

    rename the theme folder name (socialeyes) to something else (using ftp or cpanel)
    this should re-activate the default theme and get you back into the dashboard;

    as alchymyth suggested?

    Thread Starter patriciaskinner

    (@patriciaskinner)

    Thanks, I tried this and in the end even deleted social eyes theme. Still getting the same message exactly, which i really can’t understand. Beginning to think the only answer is a reinstall of wordpress.

    Sorry, this directory, https://flyakite.org/wp-content/themes/socialeyes/ is still there. Somehow you are not renaming the correct folder.

    Thread Starter patriciaskinner

    (@patriciaskinner)

    I have been through the files over and over: the version of social eyes that started the problem is now gone, but even the fresh upload is renamed.

    Thread Starter patriciaskinner

    (@patriciaskinner)

    I have dozens of error logs talking about Zend optimizer. Could this be the problem?

    I don’t know anything about Zend optimizer but if it can be turned off, you should and disable all plugins but the error clearly points to an error with the specialeyes theme.

    Again, sorry, but this directory, https://flyakite.org/wp-content/themes/socialeyes/ is still there. As long as it is wordpress will never be able to switch to the default theme. Check the link – it is still there.

    Also, you have a commercial theme. https://www.studiopress.com/ is supposed to provide you with tech support. Have you tried there?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘functions.php corrupted site’ is closed to new replies.