<?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; Dynamic</title>
	<atom:link href="http://www.cssOrigins.com/tag/dynamic/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>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>
