Support » How-To and Troubleshooting » I crashed my website please help!

I crashed my website please help!

  • Hey there,

    I was working on fixing an issue where Facebook couldn’t find any thumbnail from my posts when I would share a link.

    I came across this page: http://www.wpbeginner.com/wp-themes/how-to-avoid-no-thumbnail-issue-while-sharing-post-on-facebook/

    And I installed this pluggin: http://wordpress.org/extend/plugins/add-image-src-meta-tag/

    I didn’t notice that the pluggin was 2 years old and was outdated.. It didn’t work so I tried to paste this code into my functions.php

    function insert_image_src_rel_in_head() {
        global $post;
        if ( !is_singular()) //if it is not a post or a page
        if(!has_post_thumbnail( $post->ID )) { //the post does not have featured image, use a default image
            $default_image="http://example.com/image.jpg"; //replace this with a default image on your server or an image in your media library
            echo '<meta property="og:image" content="' . $default_image . '"/>';
            $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
            echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src[0] ) . '"/>';
        echo "
    add_action( 'wp_head', 'insert_image_src_rel_in_head', 5 );

    Then I got this fatal error:

    Parse error: syntax error, unexpected T_GLOBAL in /home/ecigaret/public_html/baddestbroads.com/wp-content/themes/Lucid/functions.php on line 8

    I have a backup on my computer, so I decided to upload the whole website back onto my server, and the error is still there… I really don’t get it.. When I tried to log on my cPanel to make a fresh backup of my database and reinstall the whole thing again, They tell me that my login is invalid…

    Here is the code from line 1 to 8 in functions.php

    add_action( 'after_setup_theme', 'et_setup_theme' );
    if ( ! function_exists( 'et_setup_theme' ) ){
    	function et_setup_theme(){
    		global $themename, $shortname, $et_store_options_in_one_row;
    		$themename = 'Lucid';
    		$shortname = 'lucid';
    		$et_store_options_in_one_row = true;

    Here is my website: [URL moderated]

    I really don’t know what to do now.. And my website must be online again ASAP!

    Please help!

  • The topic ‘I crashed my website please help!’ is closed to new replies.
Skip to toolbar