How to make and debug a WordPress theme
- Debugging in WordPress.
- Debug bar.
- Developer Docs.
- Theme Developer Handbook:
- Template file checklist.
Nodejs is a must in rapid development. Here are some essential tools.
Much template work is tweaking the CSS. A stylesheet preprocessor is a nice-to-have. Here’s how to use SASS:
sass --watch input.scss:style.css
Bower is a nice package manager. Install libraries, e.g.:
bower install jquery bootstrap jquery-ui --save
The libraries are saved in the bower_components directory. The –save option will save dependencies in bower.json. If you download a repo without dependencies, they’re installed in this way:
Yep, that’s it.
Bower is installed via npm (part of Nodejs):
npm install -g bower
Here’s a link to (my work-in-progress) theme:
Github is made for group work. Code may be forked into branches, and versions merged to a mutual production.
Projects will give the group a nice kanban for work organization. Users may rise Issues.
Ready for Upload
When all is ready you can upload the theme for review on WordPress. Delete whatever files and directories that you don’t need.
Hidden files and directories must be removed.
If you use minfied scripts and css a non-minified version should be available. The files in the WordPress theme pool should be in clear text.
Then you can try to upload the theme for review.