• Hi everyone.

    I made a big mistake that to edit the file function.php directly.

    Got this message after doing so: Parse error: syntax error, unexpected ‘return’ (T_RETURN) in /home/nconti5/public_html/wp-content/themes/motif/functions.php on line 247

    Here is the line 247
    }
    add_action( ‘wp_enqueue_scripts’, ‘motif_scripts_styles’ );

    /**
    * Enqueue Google fonts style to admin screen for custom header display.
    */
    function motif_admin_fonts() {
    wp_enqueue_style( ‘motif-fonts’, motif_fonts_url(), array(), null );
    }
    add_action( ‘admin_print_scripts-appearance_page_custom-header’, ‘motif_admin_fonts’ );

    /**
    * Custom template tags for this theme.
    */
    require get_template_directory() . ‘/inc/template-tags.php’;

    May anybody let me know where I did wrong?

    Thanks very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • Depending on how much you’ve edited, it might be easier to download your theme again and then upload functions.php to the appropriate place. Also, it’s not recommended to edit the theme’s files directly, as you’ll lose those changes if the theme is ever updated in the future. It’s best to make a child theme instead.

    After all that, if you still need help, could you post a complete copy of your current functions.php to Pastebin and post the link here?

    Thread Starter ngantran

    (@ngantran)

    @stephencottontail: thank you very much. I uploaded the file and it works. Well, I will learn how to use child theme right away 😐

    Hi,
    Glad 🙂 to know this.
    Thanks
    Mohammad

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘My site down after I revised function.php’ is closed to new replies.