Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by user3815115 for Wordpress Conditional Tags in Theme's function.php file

You can also set headers in your header.php file like this:

$now = time();    if(is_single())        $then = gmstrftime("%a, %d %b %Y %H:%M:%S GMT", $now + 60*60*6);    else        $then = gmstrftime("%a, %d %b %Y %H:%M:%S GMT", $now + 20*60);    header("Expires: $then");    header("Last-Modified: ".gmstrftime("%a, %d %b %Y %H:%M:%S GMT", $now));    header("Cache-Control: public");

Try this, i think it should work.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>