I try to install composer inside a WordPress theme.
Need help how to manage composer.json and where it should be placed to manage links inside WordPress pages.
As I understand
- we install composer and it is outside WordPress public_html folder.
- composer.JSON will be inside a root directory besides composer-LOCK
- create a vendor directory inside a root directory and place a file called autoload.php inside the vendor directory.
- we initialize components:
require_once ROOT_DIR . "vendor/autoload.php";
//use Twilio\Rest\Client;
Please inform me if this will work or PHP code need modifications?
Where (file) we place PHP code?