Marinus Klasen

Marinus Klasen

  • Development
  • Consultancy
  • Developer Resources
  • Blog
  • Contact

November 8, 2021

VS Code showing errors for functions in WordPress core?

Marinus Klasen

I literally got used to Visual Studio code highlighting function names from WordPress core when working in environments that don’t include the WordPress Core files. Quite disturbing actually – especially when you have code sniffers setup and follow WordPress Coding Standards.

Well, today I noticed it again and did some research. Apparently, there’s an easy fix!

The Easy Fix

When you have PHP Intelephense installed (and if you don’t have it, go get it), this is what you need to:

  1. Go to Preferences -> Settings
  2. Open Extensions -> Intelephense
  3. Scroll all the way down to “Subs” (it’s a large list, can’t miss it)
  4. Click “Add Item”
  5. Press “W” for WordPress, or scroll down the list untill you find it.
  6. Select WordPress and click “OK”
  7. Close your settings

That’s it!

Happy developing!

About Marinus Klasen

Marinus has been working in software/web development for more than a decade. Since 2020 his attention shifted on sharing knowledge and developing products and tools for sharing knowledge.

Marinus Klasen on Twitter

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Ready to take action?

I'm looking forward to discuss your projects and goals!
Feel free to reach out using the contact details below.

Marinus Klasen

[email protected]
twitter.com/marinusklasen
linkedin.com/in/marinusklasen

  • GitHub
  • LinkedIn
  • Twitter

Have you read?

  • An easy way to copy code blocks from the WordPress Block EditorJune 9, 2022
  • Set a static IP for docker-compose containersMay 25, 2022
  • Justified auto width in Media Carousel Widget in ElementorMay 18, 2022
  • Using the WordPress REST APIMay 18, 2022
  • Remove all edit post links in WordPress with a simple filterMay 11, 2022

Copyright © 2022 · Marinus Klasen | Webdesign by Team Rood