• PHP Help
  • Hello - i have a problem with this code

excuseme i have a problem whit this code

<link rel='preload' href="https://www.sahandveisy.com/wp-content/themes/betheme/fonts/persian-
fonts/fonts/Rezvan.woff" as="font" type="font/woff" crossorigin>

after add this code to header.php of my site reciving t_string eror
can you resolve and edit this code for me?

(Added [code]...[/code] tags ~ Mod.)

    May need to see the larger context, as that by itself is not PHP code. Is it perhaps part of a single-quoted PHP string? If so, then you would need double-quotes around ="preload" instead of single-quotes. (Or escape them, but since you're using double-quotes on the other values, that would seem more consistent and easier)

      It's not a php code but if you give a complete code or a complete error so it would be helpful to give you the solution. May be where you place this <link rel='preload' > tag it's not the correct place. I just serach about

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

      <link rel="preconnect" href="https://example.com" />
      <link rel="dns-prefetch" href="https://example.com" />

      <link rel="prerender" href="https://example.com/about.html" />

      and i found this article https://3perf.com/blog/link-rels/ hope it would be helpful to you.

        Steve_R_Jones changed the title to Hello - i have a problem with this code.
          Write a Reply...