↧
Answer by user3815115 for Wordpress Conditional Tags in Theme's function.php...
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...
View ArticleAnswer by Adeel Raza for Wordpress Conditional Tags in Theme's function.php file
If you want to find current page type use get_post_type() . the function is_single() is not used for checking the post type , it is used to check weather you are on a single post page or not. It...
View ArticleWordpress Conditional Tags in Theme's function.php file
I am trying to set HTTP response headers in my theme's function.php file, whereby i am trying to set expiry time as 6hours for single post page and 20 minutes for others.I need to check the current...
View Article