Last active
August 29, 2015 14:16
-
-
Save hirejordansmith/9f4dd69fa1287ed57f61 to your computer and use it in GitHub Desktop.
How to replace bxSlider controls with Font Awesome icons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
$('.bxslider-home').bxSlider({ | |
pagerCustom: '#bx-pager', | |
mode: 'fade', | |
onSliderLoad: function(){ | |
$(".bxslider-wrap").css("visibility", "visible"); | |
}, | |
auto: true, | |
nextText: '<i class="fa fa-angle-right"></i>', | |
prevText: '<i class="fa fa-angle-left"></i>' | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load Font Awesome | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css', array(), '4.3.0' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my case I also had to add
text-indent: normal;
to make fontawesome icons visible.