How to use material design components - web with Wordpress?
See original GitHub issueHi, how do I get this to work in Wordpress??? I’ve spent literally hours upon hours upon hours searching Google to find the answer but it seems like I’m the only person in the entire world who wants to use MDC-web with Wordpress…
I’m running Wordpress locally using XAMPP (Windows 10 OS) and have so far:
- Installed Wordpress
- Uploaded _s (underscores) starter theme to Themes directory
- Installed SASS
- Installed node.js
- Installed mdc-web to @node-modules folder in my root directory
- Added the following line to functions.php:
wp_enqueue_style( 'mdc-web-style', '/node_modules/material-components-web/dist/material-components-web.css' );
- Added the following to the start of /node_modules/material-components-web/material-components-web.scss:
$mdc-theme-primary: #00BCD4; // Cyan 500
$mdc-theme-secondary: #FFEB3B; // Yellow 500
$mdc-theme-background: #00BCD4; // Cyan 500
- Added the following to the Wordpress Sample Page:
<button class="mdc-button mdc-button--primary">
Colored button
</button>
- Opened the Wordpress Sample Page in Chrome
I was expecting the button to be coloured in Cyan 500 but for some reason it’s still just plain white. From what I can tell, I’ve done everything correctly. Why isn’t this working?
Literally all I want is the foundations of a Wordpress theme that is nothing more than Underscores starter theme, SASS and MDC-Web. How do I do this? Has anyone already done this and is able to provide a copy?
I really can’t believe I’m the first person to want to use Wordpress and MDC-Web together…
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Hey @GCMaid, sorry for my late response but I needed to finish some things before releasing the theme. If you’d like to use it, it’s open-source here. You can read the
README.md
file to know more about the project.Is that what you’re looking for? That’s a theme I made 😃