Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to replace bxSlider controls with Font Awesome icons
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>'
});
});
<?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' );
}
?>
@antongorodezkiy

This comment has been minimized.

Copy link

antongorodezkiy commented Jun 18, 2015

In my case I also had to add text-indent: normal; to make fontawesome icons visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.