I'm integrating an external script with my wordpress theme and I'm getting this error in one of my files:
PHP Fatal error: Call to undefined function get_bloginfo()
this script is located in
themes/mytheme/myscript
And all files are included as following:
include(WP_CONTENT_DIR."/themes/mytheme/myscript/myfile.php");
how can I fix it?
The issue is usually mysql related...you need to reset your wordpress db user password.
That is to say that the password for the database user for wordpress has expired and you don't know about it.
Either do a linux command-line
mysql -uroot -p
SET PASSWORD FOR <WPUSERNAME>@localhost = PASSWORD('whateveryouwant');
Or through phpmyadmin - users tab -> Edit privileges -> Change password
you must include wp-blog-header.php in your main php like this
require WP_DIR.'/wp-blog-header.php';
being WP_DIR the main wp directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With