Answer the question
In order to leave comments, you need to log in
How to set up IntelliJ Idea for WordPress theme development?
Hey!
I'm developing a theme for WP, but I can't set up the IDE to be comfortable. I want only the theme folder to be open as a project, not the entire CMS directory. But in this case, I have to manually type all the functions, and the editor marks them as undefined. However, when I open the whole project, I immediately open a bunch of unnecessary things. For example, I quickly want to open a file by name, for example, post.php in my theme, but wordpress also contains a bunch of files with the same name in other directories, and this convenient feature, I can also consider that I am losing it.
Is there any way to make it so that I only have the theme open, but the editor knows all the features of WP? Can I somehow specify a directory with functions or something else?
Answer the question
In order to leave comments, you need to log in
Hooray. I finally found how to do it. We open the topic as a project. We go to the "Project Structure" settings (the icon next to the magnifying glass in the upper right corner or CMD+;
on Mac OS. There we go to Libraries and add the folder with WP. It was enough for me to add wp-includes as Sources. If you select the entire folder with WP, then the theme also tagged as Sources Directory
I don't know how human this is, but it works nonetheless.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question