This repo is now archived and is not maintained.
Sage is a WordPress starter theme with a modern development workflow.
This branch combines the structure of Sage 8 (vanilla WP, no Laravel) with the updated workflow of the dev version of Sage 10.
Furthermore, this branch is setup for a quick start with several popular plugins, including Advanced Custom Fields, Yoast SEO, WooCommerce, and Gravity Forms.
- Sass for stylesheets
- TypeScript support
- Laravel Mix for compiling assets and concatenating and minifying files
- Browsersync for synchronized browser testing
- CSS framework: Foundation
Install the WP-Abettor plugin to enable additional features:
- Hide default dashboard widgets on the back-end
- Add a fixed position emblem & modifies favicon to differentiate development sites from production sites
- Disable the admin bar on the front-end
- Turn off comments and related comments in the back-end interface
- Disable Yoast SEO columns for posts and pages on the back-end interface
- Set default settings for Gravity Forms: HTML5 output on & CSS output off
- Move Gravity Forms injected scripts to the footer
- Remove cruft from text when pasting into the TinyMCE editor
- Removes the back-end admin top bar from larger screens
- Adds a View Site link to the admin sidebar
- Adds a Logout link to the admin sidebar
Make sure all dependencies have been installed before moving on:
- WordPress >= 6.0
- PHP >= 8.0 (with
php-mbstring
enabled) - Node.js >= 8.0.0
- Yarn
- Composer (For PHP linting)
Clone the git repo - git clone https://github.com/thinknathan/Foundation-for-Sage.git
and then rename the directory to the name of your theme or website.
Edit lib/setup.php
to enable or disable theme features, setup navigation menus, post thumbnail sizes, post formats, and sidebars.
- Run
yarn
from the theme directory to install dependencies - Update
webpack.mix.js
with your local dev URL
yarn start
— Compile assets when file changes are made, start Browsersync sessionyarn build
— Compile and optimize the files in your assets directoryyarn build:production
— Compile assets for production
yarn lint
— Evaluate the code quality of all PHP, SCSS, JS filesyarn lint:php
— Runs phpcs on all PHP filesyarn lint:scripts
— Runs eslint on all JS filesyarn lint:styles
— Runs stylelint on all SCSS files
yarn prettier
— Attempts to fix style and formatting for all PHP, SCSS, JS filesyarn prettier:php
— Runs phpcbf on all PHP filesyarn prettier:scripts
— Runs prettier on all JS filesyarn prettier:styles
— Runs prettier on all SCSS files
- Custom SASS file structure following Atomic Design principles
- SASS file structure that loads pieces of Zurb's Foundation, allowing you to easily remove chunks of CSS you're not using
- Includes SASS styles for Gravity Forms to allow easy styling
- Formats Yoast SEO Breadcrumbs to use Foundation styles
- Uses Zurb Foundation by default
- Removes jQuery by default
- A polyfill for missing JS features is loaded only as needed
- Custom login page styles in
assets/styles/molecules/_login.scss