Where to include php files in wordpress and how to refer to them later [closed]
You can put your code in a plugin, then create a REST API endpoint. For example lets create a plugin, just put a PHP file wp-content/plugins/ahmedsplugin.php or wp-content/plugins/ahmedsplugin/plugin.php with a comment in it at the top like this: <?php /** * Plugin Name: Ahmeds Plugin **/ … your code goes here … Now you’ll see … Read more