Support » Fixing WordPress » Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/soychu1/soyeonc

  • I am getting that message. please help!!
    I am a mac user. I was trying to paste some code into functions.php to create custom menu bar. and deleted the code I just pasted and updated file but not working and keep getting that message.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Where did you paste the code? You need to access your FTP and remove the code from the file.

    hi! thanks for your answer!!!!
    I added this:

    function register_my_menus() {
    ‘new-menu’ => __( ‘New Menu’ ),
    ‘another-menu’ => __( ‘Another Menu’ ),
    ‘an-extra-menu’ => __( ‘An Extra Menu’ )
    add_action( ‘init’, ‘register_my_menus’ );

    I believe i deleted it right away but didnt work.
    so I opened my cyber duck. and I have to find “functions.php” file???

    Assuming you added it to your themes function.php, then go to public_html>wp-content>themes>thethemethatyouaddedthecodeto there you should find the function.php file. Edit it and remove the code that you added.

    so download php file and edit it. and upload the new one?!
    I just did it but doesn’t seem working.T.T

    Thank you so much btw…

    Hey @soyeon_chung!

    Yes, after making the changes/removing the code you added from your functions.php file, you will need to upload the new one and remove the old one from your theme directory. If that doesn’t resolve the error, perhaps something else is causing the problem.

    Do you have URL where I can see the issue?


    hi Thank you Ryan!
    this is link still not working..

    ohhhh it’s working fine now!

    I moved endif; to the out of } and working fine now!
    Thanks much Matthew and Ryan!!!!



    You can do one of 2 things. Either download the theme to your computer and manually upload it to your WP to reinstall it. OR you can FTP to your site and RENAME your active theme to flat-bootstrap.hold which will force your site to use a default theme. That should give you access to your site. Once there, reinstall your theme. Then for future editing you should use a child-theme instead of editing theme or core files.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/soychu1/soyeonc’ is closed to new replies.