09b9392f06
The child theme loads it´s own css file and don´t need the parent themes css. But it uses the parent themes inc/enqueue.php file which register and enqueued the parent themes css file from the child themes directory. Caused a 404 request. Fixed with this changes. |
||
---|---|---|
css | ||
fonts | ||
js | ||
sass | ||
src | ||
.gitignore | ||
bower.json | ||
functions.php | ||
gulpfile.js | ||
package.json | ||
README.md | ||
screenshot.png | ||
style.css |
understrap-child
Basic Child Theme for UnderStrap Theme Framework: https://github.com/holger1411/understrap
How it works
It shares with the parent theme all PHP files and adds its own functions.php on top of the UnderStrap parent themes functions.php.
IT DIT NOT LOAD THE PARENT THEMES CSS FILE(S)! Instead it uses the UnderStrap Parent Theme as dependency via Bower and compiles its own CSS file from it.
Uses the Enqueue method the load and sort the CSS file the right way instead of the old @import methode
Installation
- Install the parent theme UnderStrap first: https://github.com/holger1411/understrap
- Just upload the understrap-child folder to your wp-content/themes directory
- Go into your WP admin backend
- Go to "Appearance -> Themes"
- Activate the UnderStrap Child theme
Editing
Add your own CSS styles to /sass/theme/_child_theme.scss ot import you own files into /sass/theme/understrap-child.scss
To overwrite Bootstrap or UnderStraps base variables just add your own value to: /sass/theme/_child_theme_variables.scss
For example: the "$brand-primary" variable is used by both, Bootstrap and UnderStrap. Add your own color like: $brand-primary: #ff6600; in /sass/theme/_child_theme_variables.scss to overwrite it. That will change automatically all elements who use this variable. It will be outputted into: /css/understrap-child.min.css and /css/understrap-child.css
So you have one clean CSS file at the end and just one request.