I came across this problem when I was creating a plugin. I cannot call(access ) wordpress default functions like wp_get_current_user()
, $wpdb->get_results()
, admin_url()
etc. from my plugin files. I can access them from my main file of that plugin in which plugin description is given. But I cannot access them from other plugin files. At that time I heard that if we create a new file functions.php and put these code in that file inside a function I can access all wordpress functions. I did so. But now I cannot access that new function. How can I solve this problem? I think you guys understood what I said. Please help me.
@Jan : I got the required thing. I just put require_once('../../../wp-load.php');
in my plugin files and now can access all wp functions from there. Any ways thanks for your reply.
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