Bootstrap Glyphicons and theme for wordpress

GeorgeTowers
GeorgeTowers used Ask the Experts™
on
Hi,

I'm developing a theme for wordpress and I'm trying to use the Glyphicons that comes with Bootstrap but I can't make it work, I have tried many things without succeed.

I'm using bootstrap 3.3.7 with sass, my fonts folder is theme_name/fonts/bootstrap/....
My css file is in the root of my theme folder,
The Glyphicons path on the css is showing  src: url(/fonts/bootstrap/glyphicons-xxx.....

I would appreciate any help.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Web Designer & Developer
Commented:
If you are using bootstrap 3.3.7 there will be 3 folders in ROOT of the dist folder you downloaded.

copy all 3 folders and paste them in your TEMPLATE folder where you STYLE.CSS file resides.

so now if you want to use the Glyphicons into your STYLE.CSSin root.. you will have to import the fonts first & then use them as below:

@font-face { .... }  and the path should be like below:

src: url('fonts/glyphicons-halflings-regular.eot');

You can copy paste the entire Glyphicon css code from bootstrap and just remove the "../" from the source path and add to your style.css in root

hope this helps.

Thanks,
Prasadh

Author

Commented:
I tried change the path from _bootstrap-variables.scss but it didn't worked, I overwrites the path to the fonts copying it to my root css and now is working.

Thanks
Prasadh BaapaatWeb Designer & Developer

Commented:
great :)
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
View your source file
Click on the links to the fonts and see if it loads.
Failing that post your rendered output.
Prasadh BaapaatWeb Designer & Developer

Commented:
its a good solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial