Fixing Errors in Custom Code

Community Forums Forums General Discussion Fixing Errors in Custom Code

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  Anita 11 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #60259

    magnify28
    Participant
    Post count: 17

    I added some php (to add a recent posts list to the dashboard ) to the custom code field and it has caused this error.

    /public_html/wp-content/uploads/prose/custom.php on line 27

    Now I can’t get into the backend to the custom code page to fix this. How can I fix this?

    Thanks.

    #60269

    Anita
    Participant
    Post count: 7356

    Hummmm did you backup your files? You may have to copy over a backup to your hosting account.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #60279

    Laura
    Moderator
    Post count: 7

    You’ll need to log in to your hosting account (possibly cPanel) and access the file there. When there’s an error in the php, you won’t be able to do anything in the WordPress dashboard.

    You can copy that file and then delete it from your site so that you can access your dashboard again. Then you can look at the code and correct as necessary.

    #60379

    magnify28
    Participant
    Post count: 17

    Thanks Laura. It looks like I need to write over the custom.php file for the prose theme. When I look in the FTP, I can’t see this file under the theme files. It looks like I need to see a structure folder where this file resides but it’s not in my theme files when I look at it under ftp.

    Shall I just ftp over the structure folder?

    Thanks.

    #60412

    Anita
    Participant
    Post count: 7356

    The custom.php file should be located in this file order – wp-content/uploads/prose/custom.php.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #60794

    magnify28
    Participant
    Post count: 17

    Thanks Anita. I tried uploading a new version of custom.php to the path. I replaced the file and am now getting another error message.

    Fatal error: Cannot redeclare prose_get_custom_php_path() (previously declared in /home/bbbb/public_html/wp-content/themes/prose/lib/structure/custom.php:20) in /home/bbbb/public_html/wp-content/uploads/prose/custom.php on line 22

    #60799

    Anita
    Participant
    Post count: 7356
    This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.