0 votes
Theres a post that says If you are interested in adding new or removing one of the default icon fonts you can use our galactica/assets/icon_fonts filter

What is the galactica/assets/icon_fonts filter? Is that in the code of the theme?

Please let me know the steps to add a new icon.

Thanks
in Adama by climbah (120 points)

1 Answer

0 votes

Your assumption is correct, this filter is in the theme's code and it requires at least basic programming knowledge.

You need to hook into mentioned filter from your child's theme functions.php file, for example if you were to add Font Awesome it would look something like this:

function my_custom_icon_fonts( $font_icons ) {
    $font_icons['font-awesome'] = array(
        'name'  => 'Font Awesome',
        'class' => 'fa',
        'url'   => get_template_directory_uri() . '/fonts/font-awesome/css/font-awesome.css',
    );
    return $font_icons;
}
apply_filters( 'galactica/assets/icon_fonts', 'my_custom_icon_fonts', 10, 1 )

by igor (520 points)
Welcome to our community website, where you can ask questions and receive answers from other members of the community.

Categories