<?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; Php</title>
	<atom:link href="http://www.cssOrigins.com/tag/php/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</title>
		<link>http://www.cssOrigins.com/2009/wordpress-for-designers/</link>
		<comments>http://www.cssOrigins.com/2009/wordpress-for-designers/#comments</comments>
		<pubDate>Fri, 01 May 2009 20:30:27 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=257</guid>
		<description><![CDATA[Hey guys after reviewing many of the &#8220;WordPress for Designers&#8221; videos at blog.themeforest.net Ive decided to go ahead and repost them , and write out commentaries describing the main features that this video blog series hits. The series will be separated into days, starting with day two&#8230; ok lets get started. Day 2 : WordPress [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Hey guys after reviewing many of the &#8220;WordPress for Designers&#8221; videos at <a title="Theme Forest" href="http://blog.themeforest.net" target="_blank">blog.themeforest.net</a> Ive decided to go ahead and repost them<span id="more-257"></span> , and write out commentaries describing the main features that this video blog series hits.</p>
<p>The series will be separated into days, starting with day two&#8230; ok lets get started.</p>
<p>Day 2 : WordPress Admin panel.<br />
<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/grg36aVKAA" /><param name="src" value="http://blip.tv/play/grg36aVKAA" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="590" height="443" src="http://blip.tv/play/grg36aVKAA" allowfullscreen="true" data="http://blip.tv/play/grg36aVKAA"></embed></object></p>
<h3>Introduction</h3>
<p>In our video here we quickly reviewed all the necessaries that we would be using in order to use and edit our new WordPress install. He quickly went over the WordPress file structure. The necessary changes that needed to be made to the wp-config.php file when we upload, and the location of our all important theme files.</p>
<blockquote><p>www.example.com/wp-content/themes/theme1</p></blockquote>
<h3>Body</h3>
<p>Moving on through the video the main bulk of this video was getting the understanding of the different template files in your wordpress theme, what they do and how they work, so lets move through a few of them.</p>
<p>As described in our video if we go to APPEARANCE | EDITOR we will be able to see all the template files included in the wordpress theme currently activated.</p>
<p>If we start by importance usualy index.php would come to mind in a wordpress site. We can see there&#8217;s no doctypes or much html data in our file at all, but rather many simple php requests to header and footer and sidebar etc.. These are essentially statements that calls in those files from you directory. So header.</p>
<p>In our header.php we find our doctypes and titles tags and start of our html elements. This is loaded at the top of every page or post that calls get_header(). Pretty easy to understand.</p>
<p>Similarly our files typically end with out get_footer() call and our footer.php contains all the closing tags for information contained within our document.</p>
<p>Single.php &#8211; used for individual post pages.</p>
<p>404.php &#8211; used when a page within your wordpress blog cannot be found.</p>
<p>Sidebar -  calls widgets and other custom information into the 1 or more sidebars in your wordpress theme.</p>
<h3>Conclusion</h3>
<p>After looking through and familiarizing yourself with the themes directory withing your wordpress install you should be able to identify the different files and what they more or less accomplish. With this basic knowledge we will be able to simply identify where and what files we need to be editing in the future while we move on to developing our own theme, in the new few videos.</p>
<p>If you&#8217;re having problems understand the videos or information please comment and we will see if we can help you out.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/wordpress-for-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Firefox Design Plugins</title>
		<link>http://www.cssOrigins.com/2009/my-firefox-design-plugins/</link>
		<comments>http://www.cssOrigins.com/2009/my-firefox-design-plugins/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:44:31 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Plug-in]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=221</guid>
		<description><![CDATA[Hey guys its finally time for me to share with you all the wonderful Firefox plug-ins I use almost daily to help me with development and design no matter what website Im working on. Be it an old table driven website from the ice age, or a modern CMS driven wordpress site, these tools can [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Hey guys its finally time for me to share with you all the wonderful Firefox plug-ins<span id="more-221"></span> I use almost daily to help me with development and design no matter what website Im working on. Be it an old table driven website from the ice age, or a modern CMS driven wordpress site, these tools can help reduce the complexity of updates, speed up development,  and quickly provide you with the information you require.</p>
<h3><img style="padding: 2px; float: right; border: 1px solid #999999; clear: both;" src="http://www.cssOrigins.com/wp-content/uploads/2009/04/seoquake.jpg" alt="" /> First SEO Quake found at <a title="SEO quake" href="http://www.seoquake.com/" target="_blank">seoquake.com</a></h3>
<p>Seo quake is both for Firefox and IE, and its primary function in is to help quantitatively define the information presented on a website or page being viewed. The main feature I would point you guys too is the keyword density ability, basically it can read through your pages and find out how many times a word or group of words appears on your site. VERY HANDY if your going for SEO optimizations this is a must, try and get your good key words between 5-20 density for maximum effect on your home page.</p>
<h3><img style="padding: 2px; float: right; clear: both; border: 1px solid #999999;" src="http://www.cssOrigins.com/wp-content/uploads/2009/04/devtoolbar.jpg" alt="" /> Next we have the all powerful Developers toolbar from <a title="Developers toolbar" href="http://chrispederick.com/" target="_blank">Chris Derick</a></h3>
<p>The toolbar can be downloaded from <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">addons.mozilla.org</a></p>
<p>Developers tool bar is a multifunction toolbar allowing users to view style information, edit css, outline styles, edit their browsers width and height and so much more. Just with those key features makes the developers toolbar the #1 Firefox extension any kind of web personnel should have. Being able to specifically target a browsers width and height is something I think we all have had to do at a specific time, and with 2 clicks boom you can view the site in that exact resolution.</p>
<p>Being able to edit css on the fly even on another website and save it off also a helpful or potentially a time saving feature. and of course most praised feature in my opinion is the ability to highlight hovered objects, and see their css roots. See what div, what class and what id they came from, makes editing your styles that must faster.</p>
<h3><img style="padding: 2px; float: right; clear: both; border: 1px solid #999999;" src="http://www.cssOrigins.com/wp-content/uploads/2009/04/colorzilla.jpg" alt="" /> Umm lets see, Colorzilla downloadable over there <a title="colorzilla" href="http://www.colorzilla.com/firefox/" target="_blank">colorzilla.com</a> !!</h3>
<p>Colorzilla is simple, it places an icon down in the lower left hand corner status bar and  you just select it to get an eye dropper in Firefox, thus allowing you to retrieve any color on the firefox screen. Oh its sOo handy.</p>
<h3>Finally we have Firebug available <a title="firebug" href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank">addons.mozilla.org</a></h3>
<h3><img style="padding: 2px; float: right; clear: both; border: 1px solid #999999;" src="http://www.cssOrigins.com/wp-content/uploads/2009/04/firebug.jpg" alt="" /></h3>
<p>Firebug has some similarities with the developers toolbar but its a lot more complex. In other words it can be used to help diagnose css related issues and help you dig deep to find what id or class your having trouble with, but where this thing has shined for me in the past is with the development of dynamic sites, the ability to track what files are specifically slowing down the loading or display of my site.</p>
<p>My list of Firefox plug-in&#8217;s again are</p>
<ul>
<li><a title="SEO quake" href="http://www.seoquake.com/" target="_blank">SEO quake</a></li>
<li><a title="Developers toolbar" href="https:https://addons.mozilla.org/en-US/firefox/addon/60//addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Developers toolbar</a></li>
<li><a title="colorzilla" href="https://addons.mozilla.org/en-US/firefox/addon/271" target="_blank">Colorzilla</a></li>
<li><a title="Firebug" href="http://getfirebug.com/" target="_blank">Firebug</a></li>
<li>and of course <a title="Firefox 3" href="http://www.mozilla.com/en-US/firefox/personal.html" target="_blank">Firefox </a> is the browser.</li>
</ul>
<p>Do you  have your own plug-in you think should be included in this, feel free to comment and let everyone know about it.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/my-firefox-design-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress unleashed</title>
		<link>http://www.cssOrigins.com/2009/wordpress-unleashed/</link>
		<comments>http://www.cssOrigins.com/2009/wordpress-unleashed/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 03:35:37 +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[Cssm Html]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Dynamic]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=173</guid>
		<description><![CDATA[For those of you out there that are wordpress developers this probably isn&#8217;t new or exciting information. But this is to those of you who just started or have very little php or otherwise programming experience. Note that this article takes at the bare minimal a basic programming understanding (ie what a variable is, and [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>For those of you out there that are wordpress developers this probably isn&#8217;t new or exciting information.<span id="more-173"></span> But this is to those of you who just started or have very little php or otherwise programming experience.</p>
<p>Note that this article takes at the bare minimal a basic programming understanding (ie what a variable is, and that code is logical)</p>
<h3>The if () { }</h3>
<p>if statements are great if your looking to target specific content with your dynamic values, for instance call a sidebar only on the home page.</p>
<blockquote><p>&lt;?php if (is_front_page()) {<br />
get_sidebar();<br />
} ?&gt;</p></blockquote>
<p>or if you would like to target multiple pages, its very similar</p>
<blockquote><p>&lt;?php if (is_page(&#8217;2,3,6,home&#8217;)) {<br />
// do stuff here on those specific pages,<br />
}</p></blockquote>
<p>Outside the loop</p>
<h3>Calling your own posts or categories</h3>
<blockquote><p>&lt;?php<br />
$my_query = new WP_Query(&#8216;category_name=yourcategory&amp;showposts=4&#8242;);<br />
echo &#8216;&lt;ul&gt;&#8217;;<br />
while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();<br />
echo &#8216;&lt;li&gt; stuff goes here &lt;/li&gt;&#8217;;</p>
<p>endwhile;<br />
echo &#8216;&lt;/ul&gt;&#8217;;<br />
?&gt;</p></blockquote>
<h3>Custom Fields</h3>
<blockquote><p>call your custom field right before you need it<br />
$key=&#8221;yourcustomfield&#8221;;<br />
then simply call echo the key like so<br />
echo get_post_meta($post-&gt;ID, $key, true);</p></blockquote>
<p>a custom key can contain pictures, html, code.</p>
<p><strong>HTML in php code</strong></p>
<p>&lt;?php echo &#8216; &lt;div&gt;all this is html&lt;/div&gt; &#8216;; ?&gt;  make sure you end your echo quotes and use your semicolen to indicate the end of a statement. while everything else inside will be printed to the screen</p>
<p>Utilizing just these things can utterly unleash wordpress you will no longer be constrained to what you can put on your sidebar or you can hand craft your home page to pull posts from different sources. The possibilities are endless.</p>
<p>Some examples are as follow</p>
<ol>
<li>dynamically add or remove the sidebar from a page or post</li>
<li>create custom banner images for each unique page</li>
<li>call post titles in your sidebar that relate to the one the user is currently looking at</li>
</ol>
<p>All this and more while keeping your site still around 90% editable in the designers eye and easily manageable in the clients eye.</p>
<p>I would like to mention that since the best and easiest way for editing material in custom places is by calling the categories they are associated with. This in turn can leave you with many categories some of which the client should add and edit and others maybe not so much. But my point is that it&#8217;s important to document those things and provide them to the client at the completion of your contract. It&#8217;s a good practice and it covers your bases, and outlines what can and cannot be changed within their site if you &#8220;sold&#8221; them that ability in the first place.</p>


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