Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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

    #1218241

    Hey 7thflow,

    Please have a look at the following thread:

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1218395

    This 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 .

    #1219850

    any update , please guide me how can i do this ?

    #1219870

    you 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

    #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

    #1220064

    But 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 .

    #1220802

    Hi,

    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,
    Ismael

    #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 .

    #1221679

    Hi,

    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,
    Ismael

    #1221688

    Thank you so much , this solved my problem by a lot .

    #1221810

    Hi 7thflow,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Replace the icon on "Scroll to Top" with HTML Character’ is closed to new replies.