<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/ispagetemplate</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 23:21:00 GMT</pubDate>
<item>
<title>(PHP) Conditional WordPress function to detect page templates when the page is used to display posts, not page content. - jamalorg</title>
<link>http://snipplr.com/view/58084/conditional-wordpress-function-to-detect-page-templates-when-the-page-is-used-to-display-posts-not-page-content/</link>
<description><![CDATA[ <p>`is_page_template()` returns false when the page in question was set to display blog posts via `Admin -> Settings -> Reading -> [Posts page]`. I've wasted few good hours figuring out what's going on, but finally, I've come up with this function which worked for me.

To use the conditional code, paste the code below in your theme's functions.php or in your plugin functions file and use it like this:

	if ( is_custom_page_template( 'template-name.php' ) ) {
		// do something
	}</p> ]]></description>
<pubDate>Mon, 22 Aug 2011 18:49:45 GMT</pubDate>
<guid>http://snipplr.com/view/58084/conditional-wordpress-function-to-detect-page-templates-when-the-page-is-used-to-display-posts-not-page-content/</guid>
</item>
</channel>
</rss>