Site logo

Archived topic

Cannot change To Top Icon, with either CSS or Function

5 replies · Started by Morgan on July 30, 2019

Viewing posts 1–6 of 6

I've tried both
.generate-back-to-top:before { content:"f0d8"; font-family: FontAwesome; !important }
and

add_filter( 'generate_back_to_top_icon','generate_back_to_top_icon' );
function generate_back_to_top_icon()
{
    return '';
}

And neither change the back to top icon.

I also have a snippet with latest FontAwesome (works), disabling made no difference:

add_action( 'wp_enqueue_scripts', 'tu_load_font_awesome' );
function tu_load_font_awesome() {
    wp_enqueue_style( 'font-awesome', '//use.fontawesome.com/releases/v5.10.0/css/all.css', array(), '5.10.0' );
}

I turned off Customizer/General/Icon type to Font, and using
.generate-back-to-top:before { content:"f0d8"; font-family: FontAwesome !important }
now shows the text "f0d8" where the button should be.
https://fontawesome.com/icons/caret-up?style=solid

Yeah that was before FA 5 really took hold and they introduced separate font families. Always fun dealing with 3rd party updates lol.

Glad to be of help.

This archived topic is closed to new replies.