<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The WordPress Guru</title>
	
	<link>http://wpguru.co.za</link>
	<description>Tips &amp; Pointers on Making a Killer CMS with WordPress</description>
	<lastBuildDate>Mon, 01 Aug 2011 10:26:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/wpguru" /><feedburner:info uri="wpguru" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Force a file to download</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/9anPjqYTbTU/</link>
		<comments>http://wpguru.co.za/templates/page/force-a-file-to-download/#comments</comments>
		<pubDate>Tue, 04 May 2010 08:42:54 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Page]]></category>
		<category><![CDATA[Single]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=168</guid>
		<description><![CDATA[In building CMS sites for clients, some may require that you offer certain files to be downloaded off their site. A PDF for example, or perhaps wallpapers or other media. Most browsers, correctly, will display these items inline as a new page or tab however for these purposes you need to force the browser to [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_169" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-169" title="download" src="http://wpguru.co.za/wp-content/uploads/download-300x199.jpg" alt="" width="300" height="199" /><p class="wp-caption-text">Image by: vizzzual-dot-com</p></div>
<p>In building CMS sites for clients, some may require that you offer certain files to be downloaded off their site. A PDF for example, or perhaps wallpapers or other media. Most browsers, correctly, will display these items inline as a new page or tab however for these purposes you need to force the browser to download the item, not display it. Here&#8217;s how it&#8217;s done.</p>
<h3>The Code</h3>
<p>Your .htaccess file is the key to getting this done, and here&#8217;s the code you need to add:</p>
<pre class="brush: xml; title: ; notranslate">AddType application/octet-stream .csv
AddType application/octet-stream .xls
AddType application/octet-stream .doc
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .mov
AddType application/octet-stream .pdf</pre>
<p>You can of course add as many other filetypes to this list as you may require, but you can get the principle from this example.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/templates/page/force-a-file-to-download/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/templates/page/force-a-file-to-download/</feedburner:origLink></item>
		<item>
		<title>Display recent Tweets in your WordPress site</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/8zGLNdmIRMY/</link>
		<comments>http://wpguru.co.za/featured/display-recent-tweets-in-your-wordpress-site/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:09:48 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=133</guid>
		<description><![CDATA[More and more corporate sites are using Twitter these days and so you&#8217;re more likely to have a client who requires some sort of Twitter activity to be shown in his site. Perhaps he wants his most recent tweet displayed, or a few results from a Twitter search feed. There are a number of Twitter [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_134" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-134" title="Twitter" src="http://wpguru.co.za/wp-content/uploads/twitter-300x244.jpg" alt="" width="300" height="244" /><p class="wp-caption-text">Image by Luc Latulippe</p></div>
<p>More and more corporate sites are using Twitter these days and so you&#8217;re more likely to have a client who requires some sort of Twitter activity to be shown in his site. Perhaps he wants his most recent tweet displayed, or a few results from a Twitter search feed.</p>
<p>There are a number of Twitter based widgets and plugins, but in most cases, they&#8217;re heavily styled and don&#8217;t make it very easy for you to integrate a tweet or two into a very specific area in your design. The script below let&#8217;s you do just that and so it&#8217;s my method of choice.</p>
<p>Here&#8217;s a great and flexible script to grab some recent tweets for your WordPress site:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
$doc = new DOMDocument();

# load the RSS -- replace 'lylo' with your user of choice
if($doc-&gt;load('http://twitter.com/statuses/user_timeline/INSERT_USERNAME_HERE.rss')) {
 echo &quot;&lt;ul&gt;\n&quot;;

 # number of &lt;li&gt; elements to display.  20 is the maximum
 $max_tweets = 10;

 $i = 1;
 foreach ($doc-&gt;getElementsByTagName('item') as $node) {
 # fetch the title from the RSS feed.
 # Note: 'pubDate' and 'link' are also useful (I use them in the sidebar of this blog)
 $tweet = $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue;

 # the title of each tweet starts with &quot;username: &quot; which I want to remove
 $tweet = substr($tweet, stripos($tweet, ':') + 1);

 # OPTIONAL: turn URLs into links
 $tweet = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
 '&lt;a href=&quot;$1&quot;&gt;$1&lt;/a&gt;', $tweet);

 # OPTIONAL: turn @replies into links
 $tweet = preg_replace(&quot;/@([0-9a-zA-Z]+)/&quot;,
 &quot;&lt;a href=\&quot;http://twitter.com/$1\&quot;&gt;@$1&lt;/a&gt;&quot;,
 $tweet);

 echo &quot;&lt;li&gt;&quot;. $tweet  . &quot;&lt;/li&gt;\n&quot;;

 if($i++ &gt;= $max_tweets) break;
 }
 echo &quot;&lt;/ul&gt;\n&quot;;
}
?&gt;</pre>
<p>Remember that if your working of a busy site, it&#8217;s probably a good idea to integrate this with a caching system to avoid any problems with the Twitter API limits.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/featured/display-recent-tweets-in-your-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/featured/display-recent-tweets-in-your-wordpress-site/</feedburner:origLink></item>
		<item>
		<title>Easy WordPress Breadcrumbs</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/T3_zwhSRRrc/</link>
		<comments>http://wpguru.co.za/navigation/easy-wordpress-breadcrumbs/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:22:40 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[breadcrumb]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=121</guid>
		<description><![CDATA[Your site should always be as usable as possible and site navigation is a big part of that. Aside from your standard sidebars and top navigation, it's always a good idea to include a breadcrumb to let users track their way back to the home page.]]></description>
			<content:encoded><![CDATA[<div id="attachment_127" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-127" title="WordPress Breadcrumbs" src="http://wpguru.co.za/wp-content/uploads/breadcrumb-300x288.jpg" alt="" width="300" height="288" /><p class="wp-caption-text">Image by PetitPlat by sk_</p></div>
<p>Your site should always be as usable as possible and site navigation is a big part of that. Aside from your standard sidebars and top navigation, it&#8217;s always a good idea to include a breadcrumb to let users track their way back to the home page. Of course there are lots of plugins you can use to insert this, but why use a plugin, when you can do it just as easily on your own.</p>
<p>Here&#8217;s the code that you&#8217;ll need to add to your functions.php file:</p>
<pre class="brush: php; title: ; notranslate">//breadcrumb function
function YLcrumbs() {
 if ((is_page() &amp;&amp; !is_front_page()) || is_home() || is_category() || is_single()) {
 echo '&lt;ul id=&quot;breadcrumbs&quot;&gt;';
 echo '&lt;li&gt;&lt;a href=&quot;'.get_bloginfo('url').'&quot;&gt;Home&lt;/a&gt;&amp;raquo;&lt;/li&gt;';
 $post_ancestors = get_post_ancestors($post);
 if ($post_ancestors) {
 $post_ancestors = array_reverse($post_ancestors);
 foreach ($post_ancestors as $crumb)
 echo '&lt;li&gt;&lt;a href=&quot;'.get_permalink($crumb).'&quot;&gt;'.get_the_title($crumb).'&lt;/a&gt;&amp;raquo;&lt;/li&gt;';
 }
 if (is_category() || is_single()) {
 $category = get_the_category();
 echo '&lt;li&gt;&lt;a href=&quot;'.get_category_link($category[0]-&gt;cat_ID).'&quot;&gt;'.$category[0]-&gt;cat_name.'&lt;/a&gt;&amp;raquo;&lt;/li&gt;';
 }
 if (!is_category())
 echo '&lt;li&gt;&lt;a href=&quot;'.get_permalink().'&quot;&gt;'.get_the_title().'&lt;/a&gt;&lt;/li&gt;';
 echo '&lt;/ul&gt;';
 }
}</pre>
<p>Then, in your template, wherever you want to display your breadcrumb, you&#8217;d add the following:</p>
<pre class="brush: php; title: ; notranslate">&lt;? YLcrumbs(); ?&gt;</pre>
<p>Note that the function generates a breadcrumb in a UL element, so your CSS might look something like this:</p>
<pre class="brush: css; title: ; notranslate">#breadcrumbs {padding: 10px 0;margin:0;}
#breadcrumbs li {display:inline;padding: 0 10px 0 0;}</pre>
<p>That would give you a  list of LI elements in a row. Then you can style it up further as you require.</p>
<p>Have you used this somewhere? Leave a link in the comments to your implementation of this breadcrumb system.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/navigation/easy-wordpress-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/navigation/easy-wordpress-breadcrumbs/</feedburner:origLink></item>
		<item>
		<title>Automatically add Google Analytics to your footer</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/RLEu7gYzyOM/</link>
		<comments>http://wpguru.co.za/featured/automatically-add-google-analytics-to-your-footer/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:09:47 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=118</guid>
		<description><![CDATA[It should be noted that using Google's Asynchronous Analytics code (triggers analytics reporting via javascript) is a much preferred option because it does its reporting in the background without hampering page load speeds. If however you need to use the standard method of inserting Google Analtyics, then here's a quick tip to insert the analytics code into your site's footer:]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-119" title="google" src="http://wpguru.co.za/wp-content/uploads/google-300x211.jpg" alt="" width="300" height="211" />It should be noted that using Google&#8217;s Asynchronous Analytics code (triggers analytics reporting via javascript) is a much preferred option because it does its reporting in the background without hampering page load speeds. If however you need to use the standard method of inserting Google Analtyics, then here&#8217;s a quick tip to insert the analytics code into your site&#8217;s footer:</p>
<pre class="brush: php; title: ; notranslate">// add google analytics to footer
function add_google_analytics() {
 echo '&lt;script src=&quot;http://www.google-analytics.com/ga.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;';
 echo '&lt;script type=&quot;text/javascript&quot;&gt;';
 echo 'var pageTracker = _gat._getTracker(&quot;UA-XXXXX-X&quot;);';
 echo 'pageTracker._trackPageview();';
 echo '&lt;/script&gt;';
}
add_action('wp_footer', 'add_google_analytics');</pre>
<p>Remember to change UA-XXXXX-X to your own analytics ID.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/featured/automatically-add-google-analytics-to-your-footer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/featured/automatically-add-google-analytics-to-your-footer/</feedburner:origLink></item>
		<item>
		<title>Changing the WordPress admin logo</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/7u6NOJ6lEs8/</link>
		<comments>http://wpguru.co.za/admin/changing-the-wordpress-admin-logo/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 13:00:28 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[logo]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=114</guid>
		<description><![CDATA[Here's a quick tip for you to change the logo in the WordPress admin area. This is handy when deploying a site for a client and you want them to feel like they're using their own custom built CMS system. ]]></description>
			<content:encoded><![CDATA[<div id="attachment_130" class="wp-caption alignright" style="width: 271px"><img class="size-medium wp-image-130" title="Custim Admin WordPress Logo" src="http://wpguru.co.za/wp-content/uploads/adminlogo1-261x300.jpg" alt="" width="261" height="300" /><p class="wp-caption-text">Image by Ludwig Gatzke</p></div>
<p>Here&#8217;s a quick tip for you to change the logo in the WordPress admin area. This is handy when deploying a site for a client and you want them to feel like they&#8217;re using their own custom built CMS system.</p>
<p>First step is to upload the image you want to use. You can do this via FTP or using the WordPress media library. Once you have the URL to your image, open your theme&#8217;s functions.php file and add the following code:</p>
<pre class="brush: php; title: ; notranslate">// custom admin login logo
function custom_login_logo() {
 echo '&lt;style type=&quot;text/css&quot;&gt;
 h1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-login-logo.png) !important; }
 &lt;/style&gt;';
}
add_action('login_head', 'custom_login_logo');</pre>
<p>Change the URL to the background image to the URL of the file you uploaded and presto!</p>
<p>Use this method? Help share this post and tell us how you used it.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/admin/changing-the-wordpress-admin-logo/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/admin/changing-the-wordpress-admin-logo/</feedburner:origLink></item>
		<item>
		<title>Creating a dynamic page or post title</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/qzbaFoNVN1o/</link>
		<comments>http://wpguru.co.za/header/creating-a-dynamic-page-or-post-title/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 12:49:14 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Header]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[title]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=109</guid>
		<description><![CDATA[If you're not a fan of using a WordPress SEO plugin to manage your page title's etc, then there's a very good way to do this yourself by using WordPress Conditional Tags.]]></description>
			<content:encoded><![CDATA[<div id="attachment_110" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-110" title="pagetitle" src="http://wpguru.co.za/wp-content/uploads/pagetitle-300x135.jpg" alt="" width="300" height="135" /><p class="wp-caption-text">Image Courtesy Michelle  Chance-Sangthon</p></div>
<p>If you&#8217;re not a fan of using a WordPress SEO plugin to manage your page title&#8217;s etc, then there&#8217;s a very good way to do this yourself by using <a href="http://codex.wordpress.org/Conditional_Tags">WordPress Conditional Tags</a>.</p>
<p>Essentially what you&#8217;re doing is adding an if/else statement that caters for your different template types.  Your standard title tag might look something like this:</p>
<pre class="brush: php; title: ; notranslate">&lt;? bloginfo('name'); ?&gt; | &lt;? bloginfo('description'); ?&gt;</pre>
<p>This would make the title of your webpage be the title of your site, followed by a pipe &#8220;|&#8221; and then the description of your site (as entered in your WordPress settings). However the problem with this is that your other pages are then not optimized using that page or posts title. What you want to do then, is make conditional statements that give a unique title on each page. This is the code you&#8217;re going to use:</p>
<pre class="brush: php; title: ; notranslate">&lt;title&gt;
 &lt;? if ( is_home() ) { ?&gt;&lt;?php bloginfo('name'); ?&gt; | &lt;?php bloginfo('description'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_search() ) { ?&gt;Search Results | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_author() ) { global $wp_query; $curauth = $wp_query-&gt;get_queried_object(); ?&gt;Author Archives | &lt;?php echo $curauth-&gt;nickname; ?&gt; | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_single() ) { ?&gt;&lt;?php wp_title(''); ?&gt; | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_page() ) { ?&gt;&lt;?php wp_title(''); ?&gt; | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_category() ) { ?&gt;&lt;?php single_cat_title(); ?&gt; | Archive | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_year() ) { ?&gt;&lt;?php the_time('Y'); ?&gt; | Archive | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_month() ) { ?&gt;&lt;?php the_time('F Y'); ?&gt; | Archive | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_day() ) { ?&gt;&lt;?php the_time('d F Y'); ?&gt; | Archive | &lt;?php bloginfo('name'); ?&gt;&lt;?php } ?&gt;
 &lt;? if ( is_404() ) { ?&gt;Page not found...&lt;?php } ?&gt;
&lt;? if (function_exists('is_tag')) { if (is_tag()) { ?&gt;&lt;?php single_tag_title(&quot;&quot;, true); ?&gt; | Tag Archive | &lt;?php bloginfo('name'); ?&gt;&lt;?php } } ?&gt;
&lt;/title&gt;</pre>
<p>What you have now is a page title that is setup to display a unique title for each of your main WordPress templates.</p>
<p>Have you tried a different method? Let us know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/header/creating-a-dynamic-page-or-post-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/header/creating-a-dynamic-page-or-post-title/</feedburner:origLink></item>
		<item>
		<title>Controlling the visibility of content with custom fields</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/CwBVj2SLmvI/</link>
		<comments>http://wpguru.co.za/templates/page/controlling-the-visibility-of-content-with-custom-fields/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 07:47:56 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Page]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom fields]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=78</guid>
		<description><![CDATA[I've just finished a project for a client who wanted an interesting feature on his site. He wanted a block of content to be turned on and off whenever he needed it. So when he wanted to promote something, he wanted to add some content and have it display until he was ready to 'turn it off'. I came up with a unique means of doing this using custom fields. Here's how you can achieve this:]]></description>
			<content:encoded><![CDATA[<div id="attachment_161" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-161" title="Custom Fields" src="http://wpguru.co.za/wp-content/uploads/customfields-300x200.jpg" alt="" width="300" height="200" /><p class="wp-caption-text">Image by: dcdead</p></div>
<p>I’ve just finished a project for a client who wanted an interesting feature on his site. He wanted a block of content to be turned on and off whenever he needed it. So when he wanted to promote something, he wanted to add some content and have it display until he was ready to ‘turn it off’. I came up with a unique means of doing this using custom fields. Here’s how you can achieve this:</p>
<h3>The Content</h3>
<p>Firstly create your page in WordPress that you’ll use as your toggle-able content page. Add your title and content and then add a custom field like active and set the value to yes.</p>
<p>SIDENOTE: It might be a good idea to set the slug of this page to something generic like /info/. This way, if the content has a ‘Read More’ link of sorts, the client wont have to continually change the slug each time he changes the title of this content area.</p>
<p>Now you’re done in the WP Admin, now you can get into your WP PHP template file where this toggle-able content will display.</p>
<h3>The Functionality</h3>
<p>Basically what you’re going to create, is a code snippet that will query the page ID of the page you created above, but before displaying the content of that page, it’ll check if the custom field value is set to yes. If it’s not, then no content will display, if its set to yes, then… well you can guess what’ll happen <img src='http://wpguru.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>The Code</h3>
<pre class="brush: php; title: ; notranslate">&lt;? if (get_post_meta(73, 'active', true) == &quot;yes&quot;) { ?&gt;
&lt;? query_posts('page_id=73'); if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
	&lt;h3&gt;&lt;? the_title(); ?&gt;&lt;/h3&gt;
	&lt;? the_content(); ?&gt;
&lt;? endwhile; endif; wp_reset_query(); ?&gt;
&lt;? } ?&gt;</pre>
<p>And that’s that. It’s a pretty simple trick and you should be able to apply the principle to a number of circumstances.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/templates/page/controlling-the-visibility-of-content-with-custom-fields/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/templates/page/controlling-the-visibility-of-content-with-custom-fields/</feedburner:origLink></item>
		<item>
		<title>WordCamp South Africa</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/tWDfsnq6rzA/</link>
		<comments>http://wpguru.co.za/general-news/wordcamp-south-africa/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 12:50:03 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[General News]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=73</guid>
		<description><![CDATA[It&#8217;s less than a week to go until WordCamp South Africa. After a lot of build up and a huge amount of work from, amongst others, Radiiate and Younique, WordCamp SA looks to be a hot event. I&#8217;m looking forward to meeting some of the big names in South African blogging, designing and developing. Mr [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wordcamp.co.za"><img class="alignright size-full wp-image-74" title="wordcamp" src="http://wpguru.co.za/wp-content/uploads/wordcamp.jpg" alt="" width="351" height="116" /></a>It&#8217;s less than a week to go until <a href="http://www.wordcamp.co.za/">WordCamp South Africa</a>. After a lot of build up and a huge amount of work from, amongst others, <a href="http://www.radiiate.com/">Radiiate</a> and <a href="http://www.younique.co.za/">Younique</a>, WordCamp SA looks to be a hot event. I&#8217;m looking forward to meeting some of the big names in South African blogging, designing and developing. Mr WordPress himself, Matt Mullenweg is going to be there and will add a lot of cred to the event.</p>
<p>Be sure to register for the event at <a href="http://www.wordcamp.co.za">www.wordcamp.co.za</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/general-news/wordcamp-south-africa/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/general-news/wordcamp-south-africa/</feedburner:origLink></item>
		<item>
		<title>Custom header images for WordPress Pages</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/CZkHRr9yi8E/</link>
		<comments>http://wpguru.co.za/header/custom-header-images-for-wordpress-pages/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 12:27:53 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Header]]></category>
		<category><![CDATA[Page]]></category>
		<category><![CDATA[Single]]></category>
		<category><![CDATA[Styling]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[custom field]]></category>
		<category><![CDATA[custom header]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=72</guid>
		<description><![CDATA[I've had a recent request regarding a popular tweak for WordPress - that is, to add custom page header images to any page in WordPress. There are one or two plugins that do this, but with a bit of creativity you can accomplish this very easily using WordPress custom fields and it's built in image uploader. Here's how:]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a <a href="http://www.jasonbagley.com/">recent request</a> regarding a popular tweak for WordPress &#8211; that is, to add custom page header images to any page in WordPress. There are one or two plugins that do this, but with a bit of creativity you can accomplish this very easily using WordPress custom fields and it&#8217;s built in image uploader. Here&#8217;s how:</p>
<h3>The basics</h3>
<p>You&#8217;re basically going to setup a number of if/else statements in your template where you want your header image to appear. The final statement will be an else statement so that if none of the above rules apply, it&#8217;ll degrade so that you&#8217;ll always have a header image on your page.</p>
<p>You&#8217;re going to create a custom field that has the name of the image that you want to use as a header image. You don&#8217;t have to add the full path to the image. Since you&#8217;re uploading your custom image in the WordPress uploader, it&#8217;ll always end up in the same folder and so the path to the image will be entered in the template.</p>
<h3>The how-to</h3>
<p>So firstly create your image, and upload it to your page.</p>
<p>Then add a custom field called &#8220;header&#8221; and put the name of the file as the value of the field.</p>
<p><img class="aligncenter size-full wp-image-71" title="customfield1" src="http://wpguru.co.za/wp-content/uploads/customfield1.jpg" alt="" width="500" height="194" /></p>
<p>Then open up your template where you want your image to appear and add the following PHP &#8211; tailored to work as you need it to&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'header'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-content/uploads/<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #b1b100;">echo</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'header'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/images/header.jpg&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>So what you&#8217;ve now done, is tell the template to check if the custom field &#8220;header&#8221; has a value. If it does, then use that value to display your image. However, if the custom field is empty, then it&#8217;ll degrade to the second default image that you specify.</p>
<p>And presto: you can now use your WP admin to control header images on each page. This is also a good way to do it because now your client can update/add his header images on his own without having to bug you.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/header/custom-header-images-for-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/header/custom-header-images-for-wordpress-pages/</feedburner:origLink></item>
		<item>
		<title>How to reset your WP Password in PHPMyAdmin</title>
		<link>http://feedproxy.google.com/~r/wpguru/~3/_Mo18zsGXxI/</link>
		<comments>http://wpguru.co.za/advanced/database/how-to-reset-your-wp-password-in-phpmyadmin/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 07:21:41 +0000</pubDate>
		<dc:creator>MarkB</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://wpguru.co.za/?p=68</guid>
		<description><![CDATA[I am using XAMPP to run a local version of WP on my machine for theme testing etc. I haven't installed the PHP mail() function because its not a feature I regularly use. This presented a problem when I misplaced my login details for my local WP install and couldn't run the 'Lost Password' feature. However I found a way to reset my WordPress password using a neat website and PHPMyAdmin. Here's how.]]></description>
			<content:encoded><![CDATA[<p>I am using <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> to run a local version of WP on my machine for theme testing etc. I haven&#8217;t installed the PHP <code>mail()</code> function because its not a feature I regularly use. This presented a problem when I misplaced my login details for my local WP install and couldn&#8217;t run the &#8216;Lost Password&#8217; feature. However I found a way to reset my WordPress password using a neat website and PHPMyAdmin. Here&#8217;s how.</p>
<p>Firstly, I logged into PHPMyAdmin and browsed the users table. I edited the entry for my &#8216;<code>admin</code>&#8216; account and found the &#8216;<code>user_pass</code>&#8216; field.</p>
<p>This field will by default have an encrypted version of your password, something like <code>$P$BERsVRczS226JkUY29j72YuVSzm3yP/</code> .</p>
<p>Instead of trying to decrypt this, I just generated a new MD5 password and pasted the encrypted version in this field.</p>
<p>I encrypted a new password using the <a href="http://www.iwebtool.com/md5">iWebTool</a> website. Type in the password you&#8217;d like to have, and then click &#8216;Encrypt&#8217;. That then generates your MD5 password. For example I typed in &#8216;<code>wpguru</code>&#8216; as my password and that generated &#8216;<code>f1c061320553d089aa807e975e2a936f</code>&#8216;.</p>
<p><img class="alignnone size-full wp-image-69" title="iwebtool" src="http://wpguru.co.za/wp-content/uploads/iwebtool.jpg" alt="" width="495" height="146" /></p>
<p>All you need to do then is paste that encrytped password into the WP database field and presto, your lost password problem is fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpguru.co.za/advanced/database/how-to-reset-your-wp-password-in-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		<feedburner:origLink>http://wpguru.co.za/advanced/database/how-to-reset-your-wp-password-in-phpmyadmin/</feedburner:origLink></item>
	</channel>
</rss>
