Call to undefined function after functions.php edit.
-
Hi,
So I was adding the following code to my functions.php file so that I could display a list of daily tasks in the Dashboard area, this has worked perfectly on 3 other installs and initially appeared to be working fine also.
add_shortcode('clarity','clarity_shortcode'); function my_admin_notice() { ?> <div class="updated"> <p><?php _e( 'Daily Tasks: <strong>Item1</strong>.', 'my-text-domain' ); ?></p> </div> <?php } add_action( 'admin_notices', 'my_admin_notice' );Shortly after adding the code and clicking update I went back to Appearance > Editor to make further changes to the text that was being displayed, I clicked ‘Update’ and when the site refreshed I received a ‘500 Internal Server Error’.
So naturally I went to the htaccess file to check for issues, but there are non here.
So I attempted to replace the functions.php file with a new, unedited one from the themes installation folder and now I’m recieveing this error:
“Fatal error: Call to undefined function get_template_directory() in /…/folder/members/wp-includes/functions.php on line 15”
I’ve moved:
require( ABSPATH . WPINC . ‘/plugin.php’ );
…above…
require( ABSPATH . WPINC . ‘/functions.php’ );
… in wp-settings.php but this hasn’t fixed the issue as suggested by some forum posts.
Can anyone help me fix this issue?
Thanks,
Best Regards,
AFX
The topic ‘Call to undefined function after functions.php edit.’ is closed to new replies.