<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cssOrigins.com &#187; Template Tags</title>
	<atom:link href="http://www.cssOrigins.com/tag/template-tags/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cssOrigins.com</link>
	<description>Css Origins, Design Blog and Wordpress Publishing Platform</description>
	<lastBuildDate>Mon, 12 Jul 2010 06:35:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Calling posts in header</title>
		<link>http://www.cssOrigins.com/2009/calling-posts-in-header/</link>
		<comments>http://www.cssOrigins.com/2009/calling-posts-in-header/#comments</comments>
		<pubDate>Tue, 19 May 2009 01:51:15 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Template Tags]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=297</guid>
		<description><![CDATA[This weekend I was trying to add what I thought to be a simple feature to my site, and it ended up taking me a lot longer than expected. Because of this I wanted to go ahead document and post about what I did and how I accomplished it. Problem I needed to add the [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This weekend I was trying to add what I thought to be a simple feature to my site,<span id="more-297"></span> and it ended up taking me a lot longer than expected. Because of this I wanted to go ahead document and post about what I did and how I accomplished it.</p>
<h2><span style="font-weight: normal;">Problem</span></h2>
<p>I needed to add the post picture stored in a custom field to my header only on the post when its called.</p>
<h2><span style="font-weight: normal;">Information</span></h2>
<p>If you guys are already familiar with wordpress in any sort of way then you will know that the single.php will handle any calls of your posts. but it also handles categories or groups of posts that are called.</p>
<h2><span style="font-weight: normal;">Hypothesis</span></h2>
<p>My hypothesis was that i could run an if statement that would test and see if it was using single.php and if it was in the specific category i want the picture applied to (in my case the only categorized with post pictures is my blog).</p>
<p>my statement was something like this</p>
<blockquote><p>&lt;php if (is_single() &amp;&amp; in_category(&#8216;blog&#8217;))<br />
echo &#8216;content &#8216;;<br />
} ?&gt;</p></blockquote>
<h2><span style="font-weight: normal;">Solution</span></h2>
<p>Although my initial hypothesis was nearly correct or at least the logic was correct it wasn&#8217;t working for some reason, the wordpress template tag for in_category was pulling no results at any time. And I believe this was because this statement was completely out of the loop being in the header and all it didn&#8217;t quite know what post it was suppose to call to be in a category or not. Any ways after trying to take a nap later that day the simple solution came to me and ended up as such.</p>
<blockquote><p>&lt;?php if (is_single()) {<br />
<span> </span> if (!is_category()) {<br />
echo &#8216;content&#8217;;<br />
}<br />
} ?&gt;</p></blockquote>
<p>Instead of testing if it&#8217;s in a category I only needed to test to see if it was displaying a category page or not, This would eliminate my border on category pages, but keep them on all my post pages, the next and last step would be to create a default image for the categories where there is no post image. Ill post on this later.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/calling-posts-in-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress for Designers #3</title>
		<link>http://www.cssOrigins.com/2009/wordpress-for-designers-3/</link>
		<comments>http://www.cssOrigins.com/2009/wordpress-for-designers-3/#comments</comments>
		<pubDate>Tue, 12 May 2009 05:31:52 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[Template Tags]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=285</guid>
		<description><![CDATA[As with the other posts in this series, This covers days 3 in the wordpress for designers tutorial videos, at blog.themeforest.net. Creating and Styling our first theme from scratch. CSS Styles In order to get our new style to accept and read our new css style sheet we have to configure just a few comments. like [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>As with the other posts in this series, This covers days 3 in the wordpress for designers tutorial videos, at <a title="blog.themeforest.net" href="http://blog.themeforest.net">blog.themeforest.net</a>.<span id="more-285"></span></p>
<h2>Creating and Styling our first theme from scratch.</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="590" height="443" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://blip.tv/play/grg36rsyj7EM" /><param name="src" value="http://blip.tv/play/grg36rsyj7EM" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="590" height="443" src="http://blip.tv/play/grg36rsyj7EM" allowfullscreen="true" data="http://blip.tv/play/grg36rsyj7EM"></embed></object></p>
<h2>CSS Styles</h2>
<p>In order to get our new style to accept and read our new css style sheet we have to configure just a few comments.</p>
<p>like below</p>
<blockquote><p>/*<br />
Theme Name: cssOrigins.com<br />
Description: the second iteration of the cssOrigins website<br />
Author: Hunter  Brelsford<br />
Author URI: http://www.cssOrigins.com<br />
version: 1.0<br />
Tags: Design, WordPress, Css<br />
Optimization: Css Optimization done by Hunter  Brelsford 4/23/09<br />
*/</p></blockquote>
<p>Make sure at this point we save our style sheet. The style sheet fortunately is ready to be read in by our new blog, even though it does not contain any kind of actual style information. All plugins, and stylesheets in wordpress are detected this way, and auto generated into their respective themes, and plugins sections under the admin panel.</p>
<p>If we go on over to see our new theme, we can see that unfortunately that its listed as a broken theme.</p>
<h2>Index.php</h2>
<p>The reason we have a broken theme is because we have no files other then the style sheet associated with our theme, wordpress needs at least one for it to recognize its theme as a valid workable theme. So we will indulge it by creating a new file and naming it &#8220;<strong>index.php</strong> &#8221;</p>
<ol>
<li>create a index.php</li>
<li>add a title</li>
<li>save the page</li>
</ol>
<p>if you want to add your own screen shot for your theme you can additionally upload a 4&#215;3 .jpg up to your themes directory.</p>
<h2>Template Tags &#8211; 10:05</h2>
<p>WordPress has many built in functions that you can use on your site. the ones used in this screen cast are covered and defined here.</p>
<ol>
<li>bloginfo(&#8216;name&#8217;)  &#8211; Uses the name of your blog thats been defined in your wordpress settings</li>
<li>bloginfo(&#8216;stylesheet_url&#8217;) &#8211; Uses the current URL where your activated themes stylesheet is located</li>
<li>language_attributes(&#8221;) &#8211; Gives the default language and type direction of the wordpress instalation</li>
<li>bloginfo(&#8216;html_type&#8217;) &#8211; Gives the page content type</li>
<li>bloginfo(&#8216;charset&#8217;) &#8211; Displays the character set of the page</li>
</ol>
<p>Template tags are nothing more then php functions in wordpress, these tags are available to access functions and variables from within wordpress.</p>
<p>More information on template tags can be found on the <a title="WordPress Codex" href="http://codex.wordpress.org/Template_Tags">wordpress codex</a></p>
<p>This article was originally brought to you by <span class="titlelink"><a href="http://dev-tips.com/">Drew Douglass</a> at <a title="Theme Forest" href="http://blog.themeforest.net/screencasts/wordpress-for-designers-day-3/" target="_blank">ThemeForest</a><br />
</span></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/wordpress-for-designers-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
