im a beginner in WordPress and i'm trying to modify a plugin and everything is going smoothly, yet whenever i create new PHP page and try require or anything it gives error and i can't access WP classes nor WP functions. what is the best way to insert new php page to plugin?.

  • What do you mean "create new PHP page"? Where? How? Jun 17, 2020 at 6:13
  • like im trying to create new php page in the plugin so i can manage to send requests and so from it without changing the main code, yet in that page i can't access wp functions.
    – omarhabeh
    Jun 17, 2020 at 6:15
  • That's not really how plugins work. I suggest taking a look at the plugin handbook to learn how they're built: developer.wordpress.org/plugins And if you need to modify an existing plugin you will need to consult its support resources for ways to do that. It's not going to be a matter of just dropping PHP files into existing plugin folders (these would be deleted if the plugin was updated anyway). Jun 17, 2020 at 6:27
  • i changed the plugin name and so, my only concern is how to require wordpress functions, in functions.php i included my page but that didn't work.
    – omarhabeh
    Jun 17, 2020 at 6:39
  • 1
    There’s not enough information in your question about what exactly you’re trying to do. Jun 17, 2020 at 8:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.