WordPress.org

Ready to get started?Download WordPress

Forums

Error message (8 posts)

  1. KenGay
    Member
    Posted 2 years ago #

    I was attempting to set-up navigation in the header and the following error message is coming up and I can't get back into the dashboard to correct it.

    How can I solve this problem please?

  2. What is the error message?

  3. Matthew Gedeon
    Member
    Posted 2 years ago #

    Your error message might not be showing up because it wasn't in backticks. Highlight the error message after you copy it in and then click on the "code" button.

  4. KenGay
    Member
    Posted 2 years ago #

    This is the message I'm getting

    Fatal error: Cannot redeclare register_my_menus() (previously declared in /home/content/16/9215716/html/wordpress/wp-content/themes/theme1185/functions.php:27) in /home/content/16/9215716/html/wordpress/wp-content/themes/theme1185/functions.php on line 39

  5. It means you are using the same function register_my_menus(). You can only use a function name once in PHP.

  6. KenGay
    Member
    Posted 2 years ago #

    Thanks Josh, I appreciate the diagnosis but is there a cure? The only thing I can access is the style sheet (style.css) anything I try to access and the error message page comes up.

    I sincerely appreciate your assistance! As well as disparately need your continued support.

  7. You need to edit your functions.php file. Specifically, look at line 27 and line 39. You will notice they each have the same function name.

    This is why you should always work with a backup, and never edit core files directly.

    To get back into your dashboard, you are going to have to get your functions.php file via FTP or your hosting providers Cpanel. Navigate to your theme, and then find the functions.php file.

    Download this file and open it in a text editor. Remove the changes you originally made to the file (hopefully you remember them).

    Lastly, reupload the file to your server, overwriting the original one.

  8. KenGay
    Member
    Posted 2 years ago #

    Josh,

    Thanks again for your help, I will be working with Godaddy to get this resolved per your instructions this evening and will let you know the results.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags