<?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/conditional</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 18:51:28 GMT</pubDate>
<item>
<title>(PHP) Wordpress Conditional statement for Singular Custom Post Type - i-am-andy</title>
<link>http://snipplr.com/view/67604/wordpress-conditional-statement-for-singular-custom-post-type/</link>
<description><![CDATA[ <p>Suppose you wanted to check if a user was viewing a singular post with the post type of testimonial. You can use the next code sample to perform this check.</p> ]]></description>
<pubDate>Thu, 04 Oct 2012 20:43:14 GMT</pubDate>
<guid>http://snipplr.com/view/67604/wordpress-conditional-statement-for-singular-custom-post-type/</guid>
</item>
<item>
<title>(PHP) WP If Home - ryarwood</title>
<link>http://snipplr.com/view/62856/wp-if-home/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 30 Jan 2012 08:47:11 GMT</pubDate>
<guid>http://snipplr.com/view/62856/wp-if-home/</guid>
</item>
<item>
<title>(HTML) Faster page load hack - IE conditional comments - Huskie</title>
<link>http://snipplr.com/view/62494/faster-page-load-hack--ie-conditional-comments/</link>
<description><![CDATA[ <p>This empty conditional comment hack is used to basically increase performance of a website. When conditional comments are used on a site, for example, for an IE6 conditional stylesheet, it will block further downloads until the css files are fully downloaded, hence increasing load time. To solve this issue, an empty conditional comment, like below, is used before any CSS is loaded in the document, and the problem will be solved!</p> ]]></description>
<pubDate>Thu, 12 Jan 2012 02:04:40 GMT</pubDate>
<guid>http://snipplr.com/view/62494/faster-page-load-hack--ie-conditional-comments/</guid>
</item>
<item>
<title>(PHP) WordPress CSS based on page title (Conditional) - stephcode</title>
<link>http://snipplr.com/view/61055/wordpress-css-based-on-page-title-conditional/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 22 Nov 2011 09:51:50 GMT</pubDate>
<guid>http://snipplr.com/view/61055/wordpress-css-based-on-page-title-conditional/</guid>
</item>
<item>
<title>(PHP) EE Multi Template Page if statement - ryarwood</title>
<link>http://snipplr.com/view/60469/ee-multi-template-page-if-statement/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Nov 2011 11:37:33 GMT</pubDate>
<guid>http://snipplr.com/view/60469/ee-multi-template-page-if-statement/</guid>
</item>
<item>
<title>(PHP) Conditional Statement if Custom Field Exists Wordpress - i-am-andy</title>
<link>http://snipplr.com/view/60283/conditional-statement-if-custom-field-exists-wordpress/</link>
<description><![CDATA[ <p>Only show content if Custom Field exists</p> ]]></description>
<pubDate>Fri, 28 Oct 2011 00:51:52 GMT</pubDate>
<guid>http://snipplr.com/view/60283/conditional-statement-if-custom-field-exists-wordpress/</guid>
</item>
<item>
<title>(Other) EE Multi Template Page if statement - ryarwood</title>
<link>http://snipplr.com/view/60072/ee-multi-template-page-if-statement/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 22 Oct 2011 08:58:12 GMT</pubDate>
<guid>http://snipplr.com/view/60072/ee-multi-template-page-if-statement/</guid>
</item>
<item>
<title>(VB.NET) Global System Object extensions for easier conditionals (VB.net example) - bryanlyman</title>
<link>http://snipplr.com/view/59759/global-system-object-extensions-for-easier-conditionals-vbnet-example/</link>
<description><![CDATA[ <p>Because there is no way to use object extenders in vb.net here is an example of how you can get similar functionality. See the C# example for further info.</p> ]]></description>
<pubDate>Fri, 14 Oct 2011 16:45:34 GMT</pubDate>
<guid>http://snipplr.com/view/59759/global-system-object-extensions-for-easier-conditionals-vbnet-example/</guid>
</item>
<item>
<title>(PHP) Thematic Insert Random HTML with condition - scottnix</title>
<link>http://snipplr.com/view/59456/thematic-insert-random-html-with-condition/</link>
<description><![CDATA[ <p>Insert a random div example with WordPress conditional logic to a Thematic action hook.</p> ]]></description>
<pubDate>Thu, 06 Oct 2011 04:41:36 GMT</pubDate>
<guid>http://snipplr.com/view/59456/thematic-insert-random-html-with-condition/</guid>
</item>
<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>
<item>
<title>(HTML) If IE7 - amandalaine</title>
<link>http://snipplr.com/view/56826/if-ie7/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 19 Jul 2011 01:56:11 GMT</pubDate>
<guid>http://snipplr.com/view/56826/if-ie7/</guid>
</item>
<item>
<title>(CSS) IE Conditional Statements - plesh</title>
<link>http://snipplr.com/view/56271/ie-conditional-statements/</link>
<description><![CDATA[ <p>Enables you to easily select older version of CSS by class rather than having a seperate CSS file for each version of IE.</p> ]]></description>
<pubDate>Fri, 08 Jul 2011 01:44:47 GMT</pubDate>
<guid>http://snipplr.com/view/56271/ie-conditional-statements/</guid>
</item>
<item>
<title>(jQuery) Conditional JQuery Validate Required Field - dan_hoerr</title>
<link>http://snipplr.com/view/55592/conditional-jquery-validate-required-field/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 22 Jun 2011 23:26:25 GMT</pubDate>
<guid>http://snipplr.com/view/55592/conditional-jquery-validate-required-field/</guid>
</item>
<item>
<title>(PHP) ExpressionEngine if Statement - ryarwood</title>
<link>http://snipplr.com/view/55061/expressionengine-if-statement/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 09 Jun 2011 05:25:16 GMT</pubDate>
<guid>http://snipplr.com/view/55061/expressionengine-if-statement/</guid>
</item>
<item>
<title>(PHP) ExpressionEngine Ghetto SEO Method - ryarwood</title>
<link>http://snipplr.com/view/55048/expressionengine-ghetto-seo-method/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 09 Jun 2011 04:28:06 GMT</pubDate>
<guid>http://snipplr.com/view/55048/expressionengine-ghetto-seo-method/</guid>
</item>
<item>
<title>(C#) System Object extensions for easier conditionals (Extending Base Object Types) - bryanlyman</title>
<link>http://snipplr.com/view/53894/system-object-extensions-for-easier-conditionals-extending-base-object-types/</link>
<description><![CDATA[ <p>.net 3.0+, To create stability in your code, you must check all inputs into a method to make sure they are valid . Often people overlook this step because of laziness, or because they aren't convinced that exceptions and assertions are actually in place to help you instead of cause you a headache. Here are some extensions which can be used to enhance the System.Object class so that their methods are global to all classes; this makes input checking effortless. This is also somewhat generic in nature because the extensions take no class type in to account before they are called, but we can use type checking to perform different boxing (casting) operations.  Sadly this cannot be done in VB.net because late binding restrictions do not allow the Object class to be extended (See my VB.Net example for further information).</p> ]]></description>
<pubDate>Sat, 21 May 2011 02:48:17 GMT</pubDate>
<guid>http://snipplr.com/view/53894/system-object-extensions-for-easier-conditionals-extending-base-object-types/</guid>
</item>
<item>
<title>(HTML) Conditional Body Tag for Drupal 7 - marshallgmoore</title>
<link>http://snipplr.com/view/52289/conditional-body-tag-for-drupal-7/</link>
<description><![CDATA[ <p>Haven't fully tested this yet.</p> ]]></description>
<pubDate>Tue, 19 Apr 2011 04:55:22 GMT</pubDate>
<guid>http://snipplr.com/view/52289/conditional-body-tag-for-drupal-7/</guid>
</item>
<item>
<title>(Rails) Shoulda with TestUnit: Conditional Validation using Shoulda/Subject - widescape</title>
<link>http://snipplr.com/view/49991/shoulda-with-testunit-conditional-validation-using-shouldasubject/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 03 Mar 2011 21:46:02 GMT</pubDate>
<guid>http://snipplr.com/view/49991/shoulda-with-testunit-conditional-validation-using-shouldasubject/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Switch Statement Example - adrianparr</title>
<link>http://snipplr.com/view/48889/as3-switch-statement-example/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 12 Feb 2011 05:59:43 GMT</pubDate>
<guid>http://snipplr.com/view/48889/as3-switch-statement-example/</guid>
</item>
<item>
<title>(Other) oOo Conditional Formatting - darfix</title>
<link>http://snipplr.com/view/48845/ooo-conditional-formatting/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 11 Feb 2011 19:42:51 GMT</pubDate>
<guid>http://snipplr.com/view/48845/ooo-conditional-formatting/</guid>
</item>
</channel>
</rss>