Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting

Debugg - fatal error:Call to undefined function get_option() in


When i was developing plugin or theme for my own wordpress blog i was happen to see this error most of the time. So that i tried to know the reason for this error. Finally i found something related to this error. Here i will explain you how the error occurs.

"Fatal error: Call to undefined function get_option() in D:\xampp\htdocs\kvp\wp-content\themes\mywptuts\kv_options.php on line 6 "

Solutions for the problem :

1. the very first reason is "wp-load.php" function may not loaded for that file mentioned as "kv_options.php".  Because the wp-load file loads the entire wordpress predefined files and contents. For that define the following line to include the file.

require_once($_SERVER['DOCUMENT_ROOT'].'/kvp/wp-load.php'); 

2.  Your file which contains the "get_option" function is attached from too many files . Your file is too long to catch it. Or else defined the function more than two times. So the problem occurs. Try to understand that more than one call can't loaded once. 
 So write the code straightway to your theme functions.php file .or your plugin's main file

3. Your wp-includes folder crashed or having some update trouble. try it on a fresh wp-includes. Don't replace with new one. Instead of replacing te old file. Delete the entire files from wp-includes folder and upload a fresh copy with in it.

these reasons i found it on my own. If you are helpful through this tutorial or still problem exist . Comment below.



2 Responses to “Debugg - fatal error:Call to undefined function get_option() in”

Unknown said...
2 September 2018 at 12:16

I was trying to change my theme.looking for a theme to fit my site.wile it was loading I mistakenly clicked on delete so I got this.Fatal error: Call to undefined function meditation_get_defaults() in /hermes/bosnacweb02/bosnacweb02cb/b1852/ipg.naaijacom/365tick/wordpress/wp-content/themes/live-portfolio/functions.php on line 23. How do I fix this error please


Unknown said...
2 September 2018 at 12:17

I was trying to change my theme.looking for a theme to fit my site.wile it was loading I mistakenly clicked on delete so I got this.Fatal error: Call to undefined function meditation_get_defaults() in /hermes/bosnacweb02/bosnacweb02cb/b1852/ipg.naaijacom/365tick/wordpress/wp-content/themes/live-portfolio/functions.php on line 23. How do I fix this error please


Post a Comment

Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting