The Base WordPress theme we start our projects with. It is a modified version of the HTML5 Reset theme.
We recommend using something like YeoPress for starting your project.
These instructions will follow the general way that we set up our project and will assume you have node.js, npm, git, yeoman, generator-wordpress, bundler, and grunt installed and configured.
- Run
yo wordpress
- Type the URL of the site when prompted and hit Enter
- Go to MakeMyPassword and generate a 5 character alphanumeric string for the table prefix.
- Type or paste the 5 character string from MakeMyPassword into the terminal and add an underscore (
_
) to the end of it - Follow the prompts for entering the rest of your database configuration
- Choose Y to initialize git
- Choose n to install WordPress as a submodule
- Choose n to use a custom directory structure
- Choose Y to install a theme
- The directory for the theme will be
socialbase
- Choose git as the theme type
- The username:
SocialDesignHouse
- The repo name:
base-theme
- The branch: master
- If everything looks okay choose Y
- If asked about overwriting, just choose Y
- cd into
wp-content/themes/socialbase/
- Run
npm install
- Run
bundle install
- Run
grunt watch
and start editing
When YeoPress installs the theme it will run the setup
task in grunt. Right now this task uses grunt-modernizr
to build a production ready version of Modernizr with the basics for you and downloads a few basic modules from bower and moves the distribution files to te correct diretories. You can customize the settings for these in Gruntfile.js
and run grunt modernizr
at any time to create a new customized version of Modernizr for your project.
The project is set up with grunt-notify so you can receive notifications when SASS, uglify, and/or cssmin are done running.
When you need to perform ajax calls that will need to be fast and may transfer a large amount of data, utilize the ajax-custom.php file as your AJAX URL instead of the admin-ajax.php file.