Bringing second plugin file into the wordpress loop
-
I have an option which I created and populated in my plugin, and I’m able to get the value of it just fine using:
get_option('myinfo')
However, I am now using a second PHP file in my plugin, and when I try to do that, I get this error:
Fatal error: Call to undefined function get_option()
Basically, I think that my second php file is totally outside of WordPress. No WordPress specific code works, it just acts like some regular php file. How can I get the php file to have access to the WordPress database?
The file is mostly standalone, all it does is respond to an Ajax request, but I just want it to have this one piece of data from my plugin.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bringing second plugin file into the wordpress loop’ is closed to new replies.