Change icon for button
-
How to change icon for button?
I want to change the Home button icon to show the Back icon.
Please support. Thank you.
-
Hi @saokimthanglong,
Hope you are doing good today 🙂
I added the related icons only into each section of the icons. But you can add any custom icon by using the filter. Just put the following snippet into your active theme functions.php file custom icon would show into Home icons list.
/* * Adding custom Icon into the list */ function fl_home_icons_cb($icons){ /* * Adding arrow-left icon to the list from fontawesome. * Choose any icon from fontawesome list. Here you can find all icons->https://fontawesome.com/v4.7.0/icons/ * Use only name of the icon like "fa fa-arrow-left" would be only "arrow-left" */ $icons[] = 'arrow-left'; /* * Returning back the icons list. */ return $icons; } /* * Filter to add custom icon into home icons list. */ add_filter('fl_home_icons', 'fl_home_icons_cb');Select that icon from floating links settings page->Design->Change Icons and Home Icon section.
Following are other filters to add any custom icon into any section.
- fl_left_icons
- fl_right_icons
- fl_random_icons
- fl_up_icons
- fl_down_icons
- fl_copy_url_icons
- fl_slimer_close_icon
- fl_slimer_open_icon
Thanks for using the plugin
Thanks for posting this workaround. It works for me. However…
Is there a way to not use the fontawesome list? I just want it to say “Next” and “Prev” and “Home”
Is that possible?
Hi @genscripter,
Hope you are doing good today 🙂
Right now there is not an option available to filter out the floating links bar but I will definitely add into a future release.
-
This reply was modified 7 years, 3 months ago by
Steven Stern (sterndata).
-
This reply was modified 6 years, 7 months ago by
Jan Dembowski.
Thanks for the quick info.
If I may be so bold to add to this thread (maybe for the benefit of future users of the Floating Links utility, which I love), if users add more assignments to the $icons[] array, they can get more than one additional icon in their list. See below:
function fl_random_icons_cb($icons){ $icons[] = 'bullseye'; $icons[] = 'globe'; $icons[] = 'map'; return $icons; } add_filter('fl_random_icons', 'fl_random_icons_cb');Hi @genscripter,
Hope you are doing good today 🙂
I have added filters in the plugin to change the content and HTML on runtime. You can find all the filters in floating-links/filters.txt file with an example.
-
This reply was modified 6 years, 7 months ago by
Jan Dembowski.
The topic ‘Change icon for button’ is closed to new replies.