Skip to content
Discussion options

You must be logged in to vote

Hi @fisicx, Thanks for reporting this issue.

Yes, there's a way to do this, see below: (Detailed Docs link...)

WordPress functions like get_header() aren't part of PHP itself, they're defined by WordPress core, which the editor can't see if you're just working inside a theme or plugin folder. So it flags them as undefined even though your code is fine.

The proper fix is to install the WordPress stubs so the editor actually knows what these functions are, you get real hover docs/autocomplete for them too, not just quiet:

Open View > Terminal in Phoenix Code (gives you a terminal already sitting in your project folder, same on Windows/Mac/Linux) and run:

composer require --dev php-stubs/wor…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by abose
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@abose
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants