Themekraft / _tk

Themekraft Starter Theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to see glyphicon or fontawesome in _tk

acurcione opened this issue · comments

I'm building a new theme utilizing _tk starter and ran into a snag. I can't seem to get any glyphicons or font-awesome icons working. If I try glyphicons, say on a menu item in WP, it puts the span tag in and it look fine in code, however nothing actually shows up on the page. No errors or anything in Firefox console either.

However in looking at the style panel in Firefox I am NOT seeing any glyphicon::before showing up at all. I see .glyphicon, but not the psuedo element.

If I then try to use font-awesome I get some weird block character where the icon should be on the page, but not the actual icon. AND what's stranger is that when I try to use font-awesome I actually get console errors pointing to glyphicons files! Makes no sense to me.

When using FA, this is part of what I see in the error console (also see attached screenshots):

/wp-content/themes/renew-life-theme-2015_tk/includes/resources/bootstrap/fonts/bootstrap/glyphicons-halflings-regular.woff2

I'm doing this build locally (apache) so there's nothing you can see online. Any ideas on why this isn't working? I've used both of these before with no issues, but this is my first time using _tk.

I should also add that this is so far an untouched _tk theme so the issue isn't from my messing with the code.

errors-with-fontawesome
block-render-with-fontawesome

Are you sure that you set the permission correctly to this files?
Try to set it to 644, and see if the error is still there, I never had any problem with this.

In my local install everything is set to 755. I tried setting 644 on the font files and it did nothing.

What I don't understand is why trying to use a FA icon is generating an error for glyphicons AND in the totally wrong location for the files as well. But at least it's actually rendering something!

commented

I also Not able to see, i don't have any errors. Using child theme

@Bulkmaker might be a different issue. Did you use the current code suggested in the Codex or the outdated one that just uses an @import for the theme stylesheet? In the latter case, try using the former.

cu, w0lf.

commented

@ginsterbusch if i copy functions, my site crash. How to copy functions.php in child theme?

Did you create an empty functions.php in your child theme directory and added suggested code? If not, do so, and everything should work.

AFAIK some of the included code of the theme is not child theme-safe, ie. lacking the very important if( !function_exists( ...) ) { ... }part. Most times that doesnt hurt, but thanks to the mechanics of the parent-child theme-system, sometimes, it does.

The reason for this is: Child theme code will be loaded first, and next up, the parent theme code. If there are functions or classes directly included from the parent theme, ie. already declared, but missing the fail-safe (class_exists or function_exists), then that will result into a fatal error.

cu, w0lf.

commented

@ginsterbusch thank you for answers, but it still not work. I don't know how to fix this. Font awesome also not working.

commented

Found a solution ? Still not working