arnabwahid / wordpress-bootstrap

Bootstrap in WordPress theme form - Bootstrap 3.3.1
1.49k stars 557 forks source link

Font Awesome not working #231

Open roljohntorralba opened 9 years ago

roljohntorralba commented 9 years ago

I installed the theme from terminal (command line) and font awesome is not working, it shows boxes instead of icons. I don't know if it's just terminal issue, because the last time I downloaded the theme somewhere at October 2014, glyhpyicon is also not working, and to fix it, I replaced wp-bootstrap font files with the font files from official getbootstrap files.

balubino commented 9 years ago

With developer tools I can observe the theme sending request for fonts from http://mylocalsite/wp-content/themes/wordpress-bootstrap-master/library/bower_components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0 Which is a wrong url (see the "library" part), but I can't find it in the code, since the source urls for fonts in the main stylesheet are correct instead.

madebydor commented 9 years ago

any solution, anyone?

velnikolic commented 9 years ago

Not sure why, but I had the same problem. I think I am done using this theme after this project if they can't get this simple thing right.

Anyways here is a quick fix until they sort things out... I basically replaced their bootstrap css with the official CDN version.

In functions.php

remove

wp_register_style( 'wpbs', get_template_directory_uri() . '/library/dist/css/styles.f6413c85.min.css', array(), '1.0', 'all' );

wp_enqueue_style( 'wpbs' );

and add

wp_enqueue_style( 'bootstrap', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css' ); wp_enqueue_style( 'fontAwesome, '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');

I think its better to download the files and link to them through your webserver, but I'm too lazy so I just use the CDN link.

Good luck.

ghost commented 9 years ago

Download Font Awesome and replace under bower_components then Search and replace on theme for fontawesome and change to font-awesome this is a typo that needs changing by developer

eduardoarandah commented 9 years ago

Maybe the owner abandoned development.

If so, what's the procedure to Take it over?

spasticninja commented 9 years ago

Doing it the way velnikolic did it, it broke the navbar so that now the wp admin bar blocks it. So that code stays for now.

Also tried updating font awesome and adding it like touchst suggested. Got the same error with updated version number. :-|

fnsm commented 9 years ago

After reading balubinos post. I checked my browser, too. It trys to fetch the file from: http://mylocalsite/wp-content/themes/wordpress-bootstrap-master/library/bower_components/**bower_components**/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0

bold one is doubled.

In wp.less line 13: @import '../../bower_components/font-awesome/less/font-awesome.less'; That should be: @import "../../bower_components/font-awesome/less/font-awesome.less";

For me it works.

lsaulapollidon commented 7 years ago

The file path isn't actually correct. It needs to go up one more level.

In wordpress-bootstrap-master>library>dist>css>styles.f6413c85.min.css - search for 'webfont'. You'll see 5 instances, the current URL is '../../bower_components/font-awesome/fonts/fontawesome-webfont.*'

That URL needs to be changed to "../../../bower_components/font-awesome/fonts/fontawesome-webfont"

It's searching under 'library' because it goes up to /dist/library/, then looks back down, which is the incorrect folder.

Hope this works for everyone else.