firsttheme
firsttheme copied to clipboard
The Complete Guide to Building Premium WordPress Themes
Source code for my course: The Complete Guide to Building Premium WordPress Themes
- Download or clone the repository in the WordPress themes directory.
- Activate the theme from wp-admin.
- Open the CMD/Terminal and change to the theme's directory (/wp-content/themes/firstheme)
- Run
npm install - Go to gulpfile.babel.js and find this code:
And change the proxy URL to the URL of your WordPress installation on your machine. The port will vary depending on the software you are using (WAMP,MAMP,XAMPP, etc..)export const serve = done => { server.init({ proxy: "http://localhost:8888/myfirsttheme" }); done(); }; - Run
npm run start, this will open a browsersync url where your browser will refresh every time you change some code in your theme. npm run startis useful for development. For production you can runnpm run buildto generate minified assets for production. (You can see generated assets in the dist folder)