Quantcast
Channel: Wordpress Conditional Tags in Theme's function.php file - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article

Wordpress 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
Browsing latest articles
Browse All 3 View Live