Google font enqueue

NapitWPTech Theme Support Forums Masonry Brick Google font enqueue

This topic contains 7 replies, has 2 voices, and was last updated by  Bishal Napit 3 months, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #477

    polov
    Participant

    hello,
    they are a problem with enqueue Google.Fonts in functions.php
    access is very slow

    with this URL https://fonts.googleapis.com/css
    error 400

    its explain here?
    h ttps://www.webnots.com/fix-slow-page-loading-waiting-fonts-googleapis-com/

    • This topic was modified 3 months, 2 weeks ago by  polov.
    #480

    Bishal Napit
    Keymaster

    @polov

    I tried to replicate the issue in my development environment but could not do it. So, maybe tell me more on this issue properly if it still persists, then I could help you out on this properly along with the link to your site too.

    Thanks.
    Bishal Napit

    #481

    polov
    Participant

    thanks,
    in fact I think it has nothing to do with your theme
    so ignore my question

    but I do not use font.google in my site
    how can i disable this function in the functions.php file?
    if it’s possible
    (I do not use Roboto and Lobster)

    • This reply was modified 3 months, 2 weeks ago by  polov.
    #483

    Bishal Napit
    Keymaster

    @polov

    If you can code that on your own then, you can dequeue the handle named as masonry-brick-google-fonts whhich loads the Google Fonts for this theme via the child theme. However, if you could not then, there might be plugin available for same in WordPress plugin directory. So, can you search there and manage as needed for your site?

    Thanks.
    Bishal Napit

    #484

    polov
    Participant

    thanks
    is it like that?

    function dequeue_googlefonts() {
    wp_dequeue_style( ‘masonry-brick-google-fonts’ );
    }
    add_action( ‘wp_print_styles’, ‘dequeue_googlefonts’, 100 );

    #485

    Bishal Napit
    Keymaster

    @polov

    Yes, that is the correct way to dequeue the parent theme styles added within theme via the child theme.

    Thanks.
    Bishal Napit

    #494

    polov
    Participant

    perfect
    thank you

    #495

    Bishal Napit
    Keymaster

    @polov

    Do let me know if you have got any further query regarding to the theme. I will try to help you on those as far as possible.

    Thanks.
    Bishal Napit

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.