title: Cookies won't set unless I inspect element
body: <p>So I am adding a cookie on a wordpress website in header.</p>
  <pre><code>setcookie(&quot;var&quot;, $var, time()+3600, &quot;/&quot;, &quot;website.com&quot;);
  </code></pre>
  <p>The problem is the cookie is visible and usable in php only if I inspect element -&gt; application -&gt; cookies (in browser).
  Otherwise I keep refreshing the page and going through the website with no cookie set.
  I know the cookie shouldn't be visible the first page load but even after the first load there is no cookie.</p>
  <p>Not sure what's the problem at this point.</p>
  <p>So I am setting the cookie on a subfolder /sub which is a wordpress file. And I am planning to use it on the index.php
  There's no issue there since after I inspect it and the cookie shows up everything works as expected.</p>