Tagged: entypo, fontello, icon, scroll to top
-
AuthorPosts
-
May 29, 2020 at 6:32 pm #1217828
Hello ,
So i was looking to optimize my site and after some research i found that entypo-fontello.woff is what we are using to show icons. On my main keyword pages this file o being loaded but it was used to load only one icon in the “Scroll To Top” arrow . Too much for a single arrow , we could replace with some SVG code itself . So i want to ask whether i can replace the same in a safe manner without hardcoding files . Also after this i would also prefer to restrict loading of entypo-fontello file on such pages where they are not required
May 31, 2020 at 6:54 pm #1218241Hey 7thflow,
Please have a look at the following thread:
If you need further assistance please let us know.
Best regards,
VictoriaJune 1, 2020 at 10:51 am #1218395This does not answer my question , the answer is 3 years old and it has changed . Also i need some function which i can load in child theme which disables it .
June 5, 2020 at 5:01 pm #1219850any update , please guide me how can i do this ?
June 5, 2020 at 6:02 pm #1219870you can do it via quick css:
go and edit the before pseudo container:
e.g:#scroll-top-link:before { content: ''; width: 100%; height: 100%; top:0; left:0; position:absolute; background-image: url(/wp-content/uploads/YOUR-ICON.svg); background-size: contain; background-repeat: no-repeat; background-position: center center; }
play with positioning top and left
June 5, 2020 at 7:25 pm #1219905@7thflow just be aware that this fontello iconfont is also used for other things e.g symbols in tabs and other elements. I had issue with that the font was blocking the performance with a waiting state. Sine I use this symbols in more or less every page I decided to try to preload the font in the header, worked very well se my reply to my own post here https://kriesi.at/support/topic/fearure-request-being-able-to-choose-a-small-png-file-instead-of-icon/#post-1219481
June 6, 2020 at 5:39 pm #1220064But the best part is i am only using the icons on one page , then why push that file through out on all my other pages , i just want to override and make it load on the page i am using .
June 9, 2020 at 10:05 am #1220802Hi,
The icon font is used by the theme in the back (e.g builder elements, theme options) and front end as @Terve mentioned previously, so you can’t disable it without breaking some layouts. You should try and focus on other areas of the site that requires optimization like images, stylesheets and scripts.
Best regards,
IsmaelJune 9, 2020 at 11:10 am #1220820@ismael i dont want to remove it completely , but can i limit loading of files to certain pages . thats all i am looking for . can you give me the function that is calling entypo-fontello file in header .
June 11, 2020 at 1:39 pm #1221679Hi,
You can use this filter to control where the font file has to load.
add_filter('avf_font_manager_load_font', function($output) { if( ! is_page(array(2)) && ! is_admin() ) { $output = ""; } return $output; }, 10, 1);
In the is_page function, add the IDs of the pages where you want the font icon to render.
Best regards,
IsmaelJune 11, 2020 at 2:01 pm #1221688Thank you so much , this solved my problem by a lot .
June 11, 2020 at 5:29 pm #1221810Hi 7thflow,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- The topic ‘Replace the icon on "Scroll to Top" with HTML Character’ is closed to new replies.