I am new to roots theme and want to change my custom wordpress theme to roots theme. What are the steps that i should follow so that finally m able to get my theme in roots. I would be glad if there is such tutorials that help me getting started to roots and converting my theme to roots. Any link please help
thanks, suku
Roots has some dependencies, so you would need to use Grunt.
My answer is based on a Windows local environment.
Make sure you set your wp-config file for Roots for development or you'll notice nothing changes in your css when you update: define('WP_ENV', 'development');
.
npm install -g grunt-cli
to install Grunt globally on your system so you can access from a project folder anywhere. You can use the command where grunt
to make sure the path is under user > AppData > Roaming > npm
. Git Bash Here
and then type in npm install
. grunt dev
. Run grunt watch
to watch the folder for code changes. Edit your code to style accordingly and ass needed (assets/less is where the style mods should live (global, and in layouts folder) and lib/extras.php for function overrides). grunt built
command to create minified asses for a live environment (and then change your wp-config to define('WP_ENV', 'production');
so it uses those assets. After that you can port the theme out (minus the node_modules folder since it's added bloat you don't need) and install.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.