0

A Lighthouse audit of my site suggests preloading the file https://partyfavorz.com/wp-content/themes/customizr-pro/assets/front/css/magnific-popup.min.css to speed up my load time.

I created a header.php file for my child theme and using their suggested format of

    <link rel="preload" href="styles.css" as="style">

and used this between the opening and closing head tag:

    <link rel="preload" href="/wp-content/themes/customizr-pro/assets/front/css/magnific-popup.min.css" as="style">

After clearing my cache and CDN and running a new audit - the critical alert remains. It has something to do with the as="min"> I'm guessing this is a style sheet and tried using that but it had no effect.

  • There are a couple more questions about this issue and only one resolved. However, that one is from 2017 and had two examples with one no longer available. The method also appears outdated. –  Nov 07 '19 at 00:48

1 Answers1

0

I went back and tried something simple like adding the theme color code in the child header and it still didn't work - even though the code was correct and I had copied the theme's header.php file over to the child theme.

I removed the code from the child theme and then installed a basic plugin called "Insert Headers and Footers" and entered the same code again. Once saved - it entered the identical code into the child theme in the exact location and now works.

I did the same thing with preload code that started this thread and it worked as well.

The issue appears to be with the Customizr theme itself. In both instances, the same code I manually put into the header file in the child theme did not work. Once it was used in the plugin - it did.