Reputation: 1201
I just installed PHP Intelephense v1.7.1 vscode extension to help with theme development. I am now getting the following errors being displayed. How can I fix this error?
Upvotes: 2
Views: 2275
Reputation: 11
In VS Code:
Upvotes: 1
Reputation: 2090
Go to VS Code Workspace settings or VS Code Folder settings and look for the Intelephense › Environment: Include Paths setting.
Here click Add Item and enter the path of a Wordpress installation main index.php file like :
"/your/path/to/wordpress/admin/index.php"
or
"/your/path/to/wordpress/index.php"
This will prevent displaying Wordpress functions and constants errors.
Upvotes: 0
Reputation: 139
there are a few extensions that help with wordpress development. e.g. 'Wordpress Hooks Intellisense' helps vscode recognize wordpress specific functions.
Upvotes: 2