• Resolved OliverCourt23

    (@olivercourt23)


    I was following a tutorial on how to hide certain posts from the blog page and it advised me to change the functions.php under theme options. I did and now when I go on my site or even change page on wordpress I get;

    ‘Fatal error: Call to undefined function get_template_directory() in /home/ab4689/public_html/wp-includes/functions.php on line 3’

    You can see for yourselves if you like by going onto https://www.olivercourtdesign.co.uk.

    I have kept the style sheet from the website but reinstalled the theme using FileZilla, thinking that would solve the problem but it hasnt. I have also cleared my cache and that hasnt helped either.

    If anyone can help I would highly appreciate it! Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do you remember exactly what you have changed in functions.php? Can you paste here please what you have added

    My guess is that your functions.php still has bad code in it. Suggest that you check again that you have made the correct changes on the correct file. OR BETTER AGAIN, restore a copy of the original file.

    Or If possible share your functions.php file code Here.

    Otherwise force your site back to using the default theme, do this by renaming your present theme directory in “wp-content/themes”.

    If you need help with fixing your functions.php file, then download a copy to your computer and use this PHP syntax checking site:
    https://www.piliapp.com/php-syntax-check/

    Thread Starter OliverCourt23

    (@olivercourt23)

    But I replaced the functions.php with the original one from Studiopress using FileZilla and it still didnt work, then I replaced the whole Agency Pro theme using FileZilla and it still doesnt work, surely that should solve the problem?

    Thread Starter OliverCourt23

    (@olivercourt23)

    I was replacing the functions.php file in the theme folder not the wp-includes folder, my bad. Cheers for the help though guys!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘'Fatal Error' after changing functions.php theme options’ is closed to new replies.