<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>The Teen Forums - Chat and more Tag: conditional tags</title>
<link>http://mycyc.com/forum/</link>
<description>The Teen Forums - Chat and more Tag: conditional tags</description>
<language>en</language>
<pubDate>Thu, 20 Nov 2008 10:34:12 +0000</pubDate>

<item>
<title>admin on "Wordpress: More On Conditional Tags"</title>
<link>http://mycyc.com/forum/topic/wordpress-more-on-conditional-tags#post-579</link>
<pubDate>Tue, 10 Jun 2008 18:25:34 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid isPermaLink="false">579@http://mycyc.com/forum/</guid>
<description>&#60;p&#62;Conditional tags are great, they are like PHPs built in if/else statements but can have more specific conditions. With conditional tags you can control what content is displayed based on whether or not the conditions have been met.&#60;/p&#62;
&#60;p&#62;For e.g. you want to write a page about how to contact you, however you only want the link to the contact page to be displayed on your homepage, you could then wrap the link in a is_home(); condition tag.&#60;br /&#62;
&#60;strong&#62;&#60;u&#62;Types Of conditional Tags&#60;/u&#62;&#60;/strong&#62;&#60;/p&#62;
&#60;ul&#62;
&#60;li&#62;&#60;strong&#62;is_home()&#60;/strong&#62; - when the blogs main page is being displayed, if you want something on your homepage only, use this tag.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_frontpage()&#60;/strong&#62; - when the front of your blog is displayed (based on your settings in options &#38;gt; reading).&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_single()&#60;/strong&#62; - when a single post is being displayed, if you want something that shows alongside single posts only, use this tag.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;comments_open()&#60;/strong&#62; - when comments for the current post are allowed.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;pings_open()&#60;/strong&#62; - when pings/trackbacks for the current post are allowed.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_page()&#60;/strong&#62; - when any page is being displayed.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_category()&#60;/strong&#62; - when any category archive is being displayed, want something that only shows in category archives? use this tag.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_tag()&#60;/strong&#62; - when the tag archive is being displayed.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_author&#60;/strong&#62; - when the author page is being displayed, want to personalise your author pages? use this tag.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;is_search&#60;/strong&#62; - when a search results page is displayed.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;!empty($post-&#38;gt;post_excerpt)&#60;/strong&#62; - when a post is using an &#60;a href=&#34;http://mycyc.com/blogging-tips-using-the-optional-excerpt-in-wordpress/&#34;&#62;optional excerpt&#60;/a&#62;.&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;empty($post-&#38;gt;post_excerpt)&#60;/strong&#62; - when a post is not using an option excerpt.&#60;/li&#62;
&#60;/ul&#62;
&#60;p&#62;There are a few more that can be used, i just listed the more common ones.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
