admin管理员组文章数量:1391751
I'm developing a custom theme on my local machine (running macOS). I'd like to edit it in my favorite text editor instead of in the browser via the Theme Editor. Is there a way to do this?
Since I'm working locally, I was thinking there might be a way to do this without going over FTP, such as editing the files directly. My dev server is Local/Flywheel.
I'm developing a custom theme on my local machine (running macOS). I'd like to edit it in my favorite text editor instead of in the browser via the Theme Editor. Is there a way to do this?
Since I'm working locally, I was thinking there might be a way to do this without going over FTP, such as editing the files directly. My dev server is Local/Flywheel.
Share Improve this question edited Feb 9, 2020 at 1:18 bertday asked Feb 8, 2020 at 0:03 bertdaybertday 1196 bronze badges 4- You should work via FTP, work on files locally and upload them on the server. For example if you have a WINDOWS environment you can use Winscp winscp/eng/index.php, an FTP client that allows to keep local/remote folders syncronized. When you edit a file locally and save it the changes are syncronized with the remote folder – Andrea Somovigo Commented Feb 8, 2020 at 1:30
- Hi @AndreaSomovigo, thank you for this suggestion! I probably should have been more specific - I'm working locally and would love to edit the files directly rather than going over FTP. I went ahead and updated my question. – bertday Commented Feb 9, 2020 at 1:19
- 1 If you are already working locally you just need to find the local files and edit them. Just check out the Local by Flywheel docs to find out where the path is on MacOS (eg. on Windows they are under Local Sites subdirectory of your user folder.) – majick Commented Feb 9, 2020 at 1:46
- 1 I do that when I'm working locally. I use VS Code and have setup the project for the website I'm developing meaning I have the folder structure in tree tab and can navigate the files easily. And while I'm working locally I don't need to use FTP and after I'm done I clone it to the live server. – David Commented Feb 9, 2020 at 21:35
1 Answer
Reset to default 0When you install your theme via the WordPress admin panel, it's just decompressing the ZIP file and placing the contents in a directory. For me, using Local as a dev server, that location was ~/Local Sites/<my-site-name>/app/public/wp-content/themes/<my-theme-name>
. You can edit those files directly and the changes will be reflected when you refresh your browser.
本文标签: Can you edit a theme in a text editor
版权声明:本文标题:Can you edit a theme in a text editor? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744764078a2623929.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论