Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Lydia Roberts
Lydia Roberts
3,535 Points

Glyphicons not working in Bootstrap WordPress theme

I've used the Bootstrap to WordPress starter theme to build a couple of custom themes, but I've never been able to get Glyphicons to work. They don't show up as boxes or anything, just totally blank.

When I view the source of the bootstrap css, the glyphicon fonts are supposed to be in this location:

url("../fonts/bootstrap/glyphicons-halflings-regular.woff")

So I've put the fonts folder in the root of the theme, with a subfolder called bootstrap that contains the font files.

When I call the fonts I use the code from the documentation on the GetBootstrap website like this:

<span class="glyphicon glyphicon-search" aria-hidden="true"></span>

I tried removing the aria-hidden="true" but when I view source in firebug the span tag still shows as gray as if it's being hidden for some reason.

How do you get Glypicons to work in WordPress?

Did you have any luck fixing this? I am having the same issue :(

2 Answers

Kevin Korte
Kevin Korte
28,149 Points

You will want to verify that your paths are correct. I'm not sure just relying on the default bootstrap paths in wordpress would work. Depends on your folder structure, but that is more than likely the problem.

Lydia Roberts
Lydia Roberts
3,535 Points

I was not able to get this to work but in the mean time I transitioned to using Roots/Sage instead of this starter theme. https://roots.io/sage/