<?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"
	>

<channel>
	<title>WordpressIntoCMS</title>
	<atom:link href="http://wordpressintocms.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpressintocms.com</link>
	<description>How I am turning Wordpress into a CMS</description>
	<pubDate>Thu, 17 Jul 2008 17:37:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Display the Subcategory Without the Parent Category</title>
		<link>http://wordpressintocms.com/display-the-subcategory-without-the-parent-category/</link>
		<comments>http://wordpressintocms.com/display-the-subcategory-without-the-parent-category/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 17:37:15 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Display]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Categories]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=17</guid>
		<description><![CDATA[Many people on the Wordpress.org support forum are asking how to do this.
Here is the simple solution I came across.  It will allow you to display the title of a child category without displaying the parent category.
Put this code in your template:
PLAIN TEXT
PHP:




&#60;?php


$category = get_the_category&#40;&#41;; 


echo $category&#91;1&#93;-&#62;cat_name;


?&#62; 






(Adapted from this code at Wordpress.org.)
The [1] [...]]]></description>
			<content:encoded><![CDATA[<p>Many people on the Wordpress.org support forum are <a href="http://wordpress.org/support/topic/148657?replies=6">asking how to do this</a>.</p>
<p>Here is the simple solution I came across.  It will allow you to display the title of a child category without displaying the parent category.</p>
<p>Put this code in your template:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$category</span> = get_the_category<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$category</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>-&gt;<span style="color:#006600;">cat_name</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>(Adapted from <a href="http://codex.wordpress.org/Template_Tags/get_the_category#Examples">this code at Wordpress.org</a>.)</p>
<p>The [1] tells it not to pull the parent category which would be [0] but instead to pull the child category which is [1].  If your hierarchy contains more layers simply change the number accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/display-the-subcategory-without-the-parent-category/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display Recent PHPBB3 Posts in Wordpress:  A method that works</title>
		<link>http://wordpressintocms.com/display-recent-phpbb3-posts-in-wordpress-a-method-that-works/</link>
		<comments>http://wordpressintocms.com/display-recent-phpbb3-posts-in-wordpress-a-method-that-works/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 16:24:29 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Display]]></category>

		<category><![CDATA[Plugin]]></category>

		<category><![CDATA[Forum]]></category>

		<category><![CDATA[phpBB3]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=15</guid>
		<description><![CDATA[After much searching followed by some searching and then some more searching I have finally struck upon a method for showing recent PHPBB3 posts in Wordpress.  There are a lot of methods out there and little bits of code but they are not all packaged up neatly in plugin form.  Thanks to Nick [...]]]></description>
			<content:encoded><![CDATA[<p>After much searching followed by some searching and then some more searching I have finally struck upon a method for showing recent PHPBB3 posts in Wordpress.  There are a lot of methods out there and little bits of code but they are not all packaged up neatly in plugin form.  Thanks to Nick Bettison of linickx.com I found that there is at least one solution that is easy for non-experts to implement.</p>
<p>(You can jump right in by visiting the <a href="http://wordpress.org/extend/plugins/phpbb-recent-topics/">phpbb_recent_topics page at Wordpress.org</a>.)</p>
<p>The one really useful bit that I would add to Bettison's documentation is that you can get the required PHPBB mysql database information (sounds a bit daunting but really isn't) by simply opening the folder where your forum is installed on your website and copying a line from it.</p>
<p>Go to your PHPBB folder (in my case http://www.metro-east.com/forum) and open config.php.  You will find the information you need listed here and then you just need to go back to the phpbb_recent_topics settings page in Wordpress and enter the database name.  </p>
<p>Next either place the widget according to the instructions at the plugin's homepage (linked above) or use the instructions to place the code in your sidebar.</p>
<p>Here is that code for the sidebar:</p>
<div class="igBar"><span id="lphp-7"><a href="#" onclick="javascript:showPlainTxt('php-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-7">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'phpbb_topics'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phpbb_topics<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>While placing the code in the sidebar the only issue I ran into was that the plugin returned an error.  The error was a missing argument in the sidebar code.</p>
<p>Here is the code as it should be:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'phpbb_topics'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phpbb_topics<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>...where the '5' is the limitation on the number of posts you want.  (The plugin settings page asks you how many posts you want to display.  I believe the issue is that when you enter a number at the settings page you are only addressing the plugin's widget.  If you are installing it in the sidebar you need to add the '5' (or any other number as you wish) in this manner.</p>
<p>I am working on some formatting issues but the main work has been done.  You can see it in action on the blog posts at my site, for example:  <a href="http://www.metro-east.com/the-sporting-blog/the-playoffs-are-still-within-reach/">http://www.metro-east.com/the-sporting-blog/the-playoffs-are-still-within-reach/</a></p>
<p>UPDATE: Here is how I was able to style the list.</p>
<p>Go to your Plugin Editor in Wordpress and select the phpbb_recent_topics plugin.  Find these lines:</p>
<div class="igBar"><span id="lphp-9"><a href="#" onclick="javascript:showPlainTxt('php-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> widget_phpbb_recent_topics<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$before_class</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$before_title</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . <a href="http://www.php.net/stripslashes"><span style="color:#000066;">stripslashes</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>get_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'prt_widget_title'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . <span style="color:#0000FF;">$after_title</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">require</span><span style="color:#006600; font-weight:bold;">&#40;</span>PRTPLUGINPATH . <span style="color:#FF0000;">'/display/display.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$after_class</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and replace them with lines similar to these:</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> widget_phpbb_recent_topics<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;li class=&quot;blogsidebox&quot;&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$before_title</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . <a href="http://www.php.net/stripslashes"><span style="color:#000066;">stripslashes</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>get_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'prt_widget_title'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . <span style="color:#0000FF;">$after_title</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">require</span><span style="color:#006600; font-weight:bold;">&#40;</span>PRTPLUGINPATH . <span style="color:#FF0000;">'/display/display.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/li&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The only difference is that you are specifying
<li class="yourclasshere"> and </li>
<p> before and after each phpBB topic link.  Then all you have to do is select how you want to style your CSS class for the list item.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/display-recent-phpbb3-posts-in-wordpress-a-method-that-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Redirect Case Sensitive URL Using mod_rewrite and PHP</title>
		<link>http://wordpressintocms.com/redirect-case-sensitive-url-using-mod_rewrite-and-php/</link>
		<comments>http://wordpressintocms.com/redirect-case-sensitive-url-using-mod_rewrite-and-php/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 15:10:55 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[URL]]></category>

		<category><![CDATA[.htaccess]]></category>

		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=11</guid>
		<description><![CDATA[In Wordpress you may have noticed that the page slug defaults to lower case letters.  I have learned that it does this in order to prevent potential problems or conflicts between Windows, Linux, and different browers.
Unfortunately, this can also cause problems.
For example, a user recently tried to visit Metro-East.com/bloggers by typing Metro-East.com/Bloggers into the [...]]]></description>
			<content:encoded><![CDATA[<p>In Wordpress you may have noticed that the page slug defaults to lower case letters.  I have learned that it does this in order to prevent potential problems or conflicts between Windows, Linux, and different browers.</p>
<p>Unfortunately, this can also cause problems.</p>
<p>For example, a user recently tried to visit <a href="http://Metro-East.com/bloggers">Metro-East.com/bloggers</a> by typing <a href="http://Metro-East.com/Bloggers">Metro-East.com/Bloggers</a> into the address bar.  (This is a simple entry page for bloggers and is not very interesting to look at.)  The server treated the URLs as though they pointed to two different pages and so this caused an error because as far as it was concerned <a href="http://Metro-East.com/Bloggers">Metro-East.com/Bloggers</a> did not exist.</p>
<p>I needed to find a way to make URLs <strong>not be case sensitive</strong>.</p>
<p>In other words, <strong>I had to find a way to redirect from the upper case URL to the lower case URL</strong>.  </p>
<p>I searched for almost an hour trying to find a tutorial or explanation that I could understand.  (My knowledge on these subjects is very limited and I pretty much need things spelled out for me very...very...slowly.)</p>
<p>I finally came across <a href="http://www.tellinya.com/read/2007/09/29/168.html">this article at TellinYa.com</a> that explains <strong>how to use mod_rewrite on your .htaccess file to call a PHP function that will redirect from lower case to upper case URLs</strong>.</p>
<p>In order to implement this fix all you need is access to your server so that you can upload files.</p>
<p>Open your .htaccess file and add these lines:</p>
<div class="igBar"><span id="lhtml-13"><a href="#" onclick="javascript:showPlainTxt('html-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-13">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># ReRoute Uppercase Containing URLs</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteCond %{REQUEST_URI} [A-Z]</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteRule ^(.*)$ lcaseurl\.php\?url=\/$1 [L,NC] </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Then create a new file named <em>lcaseurl.php</em>.</p>
<p>Paste this code into <em>lcaseurl.php</em> and put it in your root directory:</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Check if URL is passed as parameter</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/strlen"><span style="color:#000066;">strlen</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'url'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Redirect to the lower-case version permanently</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"HTTP/1.0 301 Resource Moved Permanently"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Location: "</span>.<a href="http://www.php.net/strtolower"><span style="color:#000066;">strtolower</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'url'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">""</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color:#000066;">exit</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// If not URL passed return a 404</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"HTTP/1.1 404 Not Found"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That's it!  Problem solved. You can test it out by visiting <a href="http://Metro-East.com/Blogs">Metro-East.com/Blogs</a> or <a href="http://Metro-East.com/blogs">Metro-East.com/blogs</a>.  They will both go to the same page.  (A short list of the different blogs at my website.)</p>
<p>Here is <a href="http://www.unitedforums.co.uk/vb/website-development-scripting/11344-case-sensitive-would-mod-rewrite-help.html">a recent forum post on the subject</a> that is not directly related to the solution I've put forth here.  It was one of the most informative threads I found while surfing for answers.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/redirect-case-sensitive-url-using-mod_rewrite-and-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Custom Login Branding Without Using a Plugin</title>
		<link>http://wordpressintocms.com/custom-login-branding-without-plugin/</link>
		<comments>http://wordpressintocms.com/custom-login-branding-without-plugin/#comments</comments>
		<pubDate>Fri, 30 May 2008 16:25:29 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Display]]></category>

		<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=8</guid>
		<description><![CDATA[This is a continuation of yesterday's post about Custom Admin Branding. 
As you'll recall, I was trying to find a way to brand the Login screen without using the Custom Admin Branding plugin and I promised I would share the method with you when I figured it out.
You can see the final result at my [...]]]></description>
			<content:encoded><![CDATA[<p>This is a continuation of yesterday's <a href="http://wordpressintocms.com/custom-admin-branding/">post about Custom Admin Branding</a>. </p>
<p>As you'll recall, I was trying to find a way to brand the Login screen without using the Custom Admin Branding plugin and I promised I would share the method with you when I figured it out.</p>
<p>You can see the final result <a href="http://www.metro-east.com/wp-login.php">at my login page for Metro-East.com</a>.</p>
<p>In order to create your own custom branded login page you need to get a copy of your <em>login.css</em> file.  This file resides in the <em>/wp-admin/css/</em> directory of your Wordpress installation.  (Go to the <em>root directory</em> of your installation and then open the <em>wp-admin</em> folder and then open the <em>css</em> folder.  Copy this file to your computer so that you can modify it.)  </p>
<p>Open the <em>login.css</em> file using a text editor.  I use good ole' Notepad.  (Do not use a word processor, only use a <a href="http://en.wikipedia.org/wiki/Text_editor">text editor</a>.)</p>
<p><strong>SAVE A COPY</strong><br />
Just in case something goes wrong, save a copy of your login.css file so that you can easily restore Wordpress to its original configuration.</p>
<p>Once you have the file open, locate any CSS code that is marked <em>#login</em>.  This is the CSS <em>"id"</em> tag used by Wordpress for your Login form.  Delete all of the <em>#login</em> CSS styling-  we are about to replace it.  Likewise, delete the <em>#nav</em> CSS styling.  This is the styling for the links on your Login form.</p>
<p>Now copy and paste the following code into your <em>login.css</em> file:</p>
<div class="igBar"><span id="lcss-17"><a href="#" onclick="javascript:showPlainTxt('css-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-17">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* Change these values to alter the color of the button on the login screen*/</span>&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#login form <span style="color: #6666ff;">.submit </span>input <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background-color</span>: #cee1ef !important;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-color</span>:#80b5d0;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span>:#246;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#login form <span style="color: #6666ff;">.submit </span>input<span style="color: #3333ff;">:hover </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-color</span>:#000;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span>:#fff;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* This is where you insert your custom branding image*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#login form <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">background</span>:<span style="color: #993333;">url</span><span style="color: #66cc66;">&#40;</span>/images/custom_login.jpg<span style="color: #66cc66;">&#41;</span> <span style="color: #993333;">center</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">no-repeat</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-top</span>:100px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* This tells Wordpress not to display the old Wordpress logo*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#login h1 <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span>:<span style="color: #993333;">none</span>;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#login <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">width</span>: 292px; <span style="color: #000000; font-weight: bold;">margin</span>: 7em <span style="color: #993333;">auto</span>; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#login_error, <span style="color: #6666ff;">.message </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: <span style="color: #cc66cc;color:#800000;">0</span> <span style="color: #cc66cc;color:#800000;">0</span> 16px 8px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-width</span>: 1px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border-style</span>: <span style="color: #993333;">solid</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span>: 12px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* Change the color of the links to suit your needs*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#nav a <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-top</span>: 16px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-left</span>:10px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:12px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">color</span>: #FFFFFF;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#nav <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-top</span>: 16px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">padding-left</span>:10px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">font-size</span>:12px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">color</span>: #FFFFFF;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Thanks to <a href="http://pressingpixels.com/wordpress-custom-admin-branding/">Pressing Pixels for this code</a>, which I pulled from their plugin and then figured out how to use.</p>
<p>Make sure you save the newly edited file as <em>login.css</em> and upload back to the <em>wp-admin/css</em> folder.</p>
<p>The only thing left to do then is to upload the image you want to use.  If you're like me and you're not great with Adobe Photoshop then you might seriously want to consider downloading the Custom Admin Branding plugin from the Pressing Pixels link above because they were kind enough to supply a template that you can use to create your image.</p>
<p>Either way, what you need to create is an image 284 pixels wide and 291 pixels high and save it as <em>custom_login.jpg</em>.</p>
<p>Here is the image being used at Metro-East.com:<br />
<center><img src="http://www.metro-east.com/images/custom_login.jpg"></center></p>
<p>You can customize it further by changing your image around or by changing the CSS code for #login and #nav.  Experiment with things and see what works for you- you won't be able to break anything.  (Make sure you have your backup file, just in case.)</p>
<p><strong>Bonus:</strong><br />
How to use a custom background on your Login page that is different from the background on your other pages.</p>
<p>There are, as always with Wordpress, other ways to do this.  Here is the method that I am using, though:</p>
<ol>
<li>Download and open your <em>wp-login.php</em> file from your root directory using a text editor.</li>
<li>Find the line that looks similar to this:
<div class="igBar"><span id="lhtml-18"><a href="#" onclick="javascript:showPlainTxt('html-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-18">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"login"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"background-image:url(/images/metroeastcollage.gif);height:400px;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></li>
<li>Place the background image you want to use in the spot where I have <em>metroeastcollage.gif.</em></li>
<li>Save and upload your file.</li>
</ol>
<p>You can see this in action at the <a href="http://www.metro-east.com/wp-login.php">Metro-East.com login page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/custom-login-branding-without-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Custom Admin Branding:  With or Without Plugin</title>
		<link>http://wordpressintocms.com/custom-admin-branding/</link>
		<comments>http://wordpressintocms.com/custom-admin-branding/#comments</comments>
		<pubDate>Thu, 29 May 2008 16:07:37 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Admin]]></category>

		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=7</guid>
		<description><![CDATA[I will be writing in the near future about Wordpress plugins that I have been using at Metro-East.com.  This morning, however, I want to write about a new plugin that I have just installed.  (*Shocking/interesting note:  I just counted and I have 57 plugins installed at Metro-East.com and 30 of those are [...]]]></description>
			<content:encoded><![CDATA[<p>I will be writing in the near future about Wordpress plugins that I have been using at Metro-East.com.  This morning, however, I want to write about a new plugin that I have just installed.  (*Shocking/interesting note:  I just counted and I have 57 plugins installed at Metro-East.com and 30 of those are currently active.  I'd say I have some material for future posts.)</p>
<p><em>Pressing Pixels</em> has <a href="http://pressingpixels.com/completing-the-cms-with-wordpress/">a list of plugins useful for turning Wordpress into a CMS</a>.</p>
<p>They have one plugin in particular that I am about to try out.  It is their own creation, <a href="http://pressingpixels.com/wordpress-custom-admin-branding/"><em>Custom Admin Branding</em></a>.  This modification is not about functionality but rather presentation.  Basically the plugin will allow you to remove any generic Wordpress branding from your interface and replace it with more visually appealing and personalized custom branding.  (If we're going to be turning Wordpress into a CMS, anything that makes it less "Wordpressy" is worth looking into.)</p>
<p>(15 minutes later...)  Success!</p>
<p>I am not a Photoshop pro so it took me a little while to create new images, but if you follow the instructions for the plugin it turns out to be quite simple to customize your branding.  All that is required is to install the plugin in the usual manner and then create new images to replace the default images that are included.</p>
<p>However...</p>
<p>I did run into a little difficulty.  At the same time I installed the <em>Custom Admin Branding</em> plugin I came across the <a href="http://deanjrobinson.com/projects/fluency-admin/"><em>Fluency Admin</em> plugin</a>.  The <em>Fluency</em> plugin revamps your Wordpress Dashboard and moves all of the menus to the left of the screen.</p>
<p>I learned that Fluency is often combined with the <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/"><em>Admin Drop Down Menu</em> plugin</a> as a means of conserving space and increasing efficiency, so I installed it also.</p>
<p>I was impressed!  This makes the interface on the Dashboard about one hundred times easier to navigate and on top of that it looks very nice.  I think my new bloggers will really appreciate the improvement and simplicity as they learn how to use the Wordpress system.</p>
<p>The difficulty I ran into was compatibility between <em>Custom Admin Branding</em>, <em>Fluency</em>, and <em>Admin Drop Down Menu</em>.  The custom header image I created did not want to line up nicely with the new interface and, moreover, it just didn't really seem to fit with the new sleek look of the Dashboard.</p>
<p>I could have just deactivated <em>Custom Admin Branding</em>, but I really liked the custom Login branding.</p>
<p>This set me on a quest to customize the Login screen without using <em>Custom Admin Branding</em>.  I will detail that experience and post a tutorial in the next couple of days.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/custom-admin-branding/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display RSS Feeds From Another Website Using PHP</title>
		<link>http://wordpressintocms.com/display-rss-feeds-from-another-website-using-php/</link>
		<comments>http://wordpressintocms.com/display-rss-feeds-from-another-website-using-php/#comments</comments>
		<pubDate>Thu, 29 May 2008 05:02:32 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Display]]></category>

		<category><![CDATA[Featured]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=6</guid>
		<description><![CDATA[In this article I will show you how you can add RSS feeds from other websites to your Wordpress website using only a few simple lines of PHP code.  No plugin is required.
This ability has got to be both one of the most sought-after Wordpress solutions and one of the least-documented.  I will [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will show you how you can add RSS feeds from other websites to your Wordpress website using only a few simple lines of PHP code.  No plugin is required.</p>
<p>This ability has got to be both one of the most sought-after Wordpress solutions and one of the least-documented.  I will give you the code to implement it and try to explain it as best as I can.</p>
<p>First, in case you weren't aware, the reason that you want to use PHP to display the feed is for Search Engine Optimization purposes.  Most solutions you will find on the net for displaying RSS feeds use Javascript.  However, <em>Search Engines such as Google can read PHP but they cannot read Javascript</em>.</p>
<p>This means that the RSS feeds you display using PHP are (for most intents and purposes) considered to be <em>content</em>.  If that doesn't have you jumping for joy then either you already knew it or you need to go read up on Search Engine Optimization (SEO).</p>
<p>Without further ado, here is the code:</p>
<div class="igBar"><span id="lphp-21"><a href="#" onclick="javascript:showPlainTxt('php-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-21">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">require_once</span> <span style="color:#006600; font-weight:bold;">&#40;</span>ABSPATH . WPINC . <span style="color:#FF0000;">'/rss-functions.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// insert the feed URL here</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$rss</span> = @fetch_rss<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'http://mlb.mlb.com/partnerxml/gen/news/rss/stl.xml'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> <a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp;&amp; <span style="color:#CC66CC;color:#800000;">0</span> != <a href="http://www.php.net/count"><span style="color:#000066;">count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// set the number of items from the feed to display (10)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span> = <a href="http://www.php.net/array_slice"><span style="color:#000066;">array_slice</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$item</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=<span style="color:#FF0000;">'&lt;?php echo wp_filter_kses($item['</span><a href="http://www.php.net/link"><span style="color:#000066;">link</span></a><span style="color:#FF0000;">']); ?&gt;'</span> target=<span style="color:#FF0000;">"_blank"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> wp_specialchars<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The URL 'http://mlb.mlb.com/partnerxml/gen/news/rss/stl.xml' is the RSS feed's address.  You can plug any RSS feed URL into this spot.</p>
<p>The line '$rss->items = array_slice($rss->items, 0, 10);' tells the code how many headlines to display.  I have chosen 10 but you can choose any other number.  (Within reason or your page will never finish loading.)</p>
<p>As with most things I will be writing about here at WordpressIntoCMS.com, you can see this code in action at Metro-East.com, this time on <a href="http://www.metro-east.com">the front page</a> with the Local Headlines and the St. Louis Cardinals headlines.</p>
<p>Keep in mind that the above code will generate <em>headlines only</em>.</p>
<p>If you want to get even more in-depth, there are ways to expand this content.</p>
<p>For example, I have <a href="http://www.metro-east.com/events">a page which shows all events in the St. Louis area</a> as supplied by the appropriate RSS feed from <a href="http://www.eventful.com">Eventful</a>.  If you visited that link you saw that there is a lot more than just headlines there.  (It is worth noting once more that <em>I didn't write any of that</em>.  All of the content is generated by Wordpress and this PHP code, courtesy of Eventful.)</p>
<p>Here is the code as it stands as of this writing:</p>
<div class="igBar"><span id="lphp-22"><a href="#" onclick="javascript:showPlainTxt('php-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-22">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#006600; font-weight:bold;">&#40;</span>ABSPATH . WPINC . <span style="color:#FF0000;">'/rss-functions.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$url</span> = <span style="color:#FF0000;">'http://eventful.com/rss/events/?q=&amp;location_type=metro_id&amp;location_id=18&amp;l=St.%20Louis%20metro%20area&amp;sort_order=Mojo'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$rss</span> = fetch_rss<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$url</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$rss</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$i</span> = <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rss</span>-&gt;<span style="color:#006600;">items</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$href</span> = <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'link'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$title</span> = <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$description</span> = <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'description'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;b&gt;&lt;u&gt;&lt;a xhref=$href&gt;$title&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;$description"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span> == <span style="color:#CC66CC;color:#800000;">30</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#616100;">break</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$i</span> = <span style="color:#0000FF;">$i</span> + <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You can see the URL field again but now I have added other variables to expand the content.</p>
<p>The 'echo' command tells the PHP code what to output.  This is where you can style the content.  I will be improving this later but as of now you can see that I added some bold font, an underline, and a page break.  You can do anything you want here, including CSS.</p>
<p>I hope you'll find this useful as you try to add extra content to your websites using RSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/display-rss-feeds-from-another-website-using-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display Posts: Limit Number, Limit Categories, and Include Excerpt and Thumbnail</title>
		<link>http://wordpressintocms.com/limit-categories-include-excerpt-thumbnail/</link>
		<comments>http://wordpressintocms.com/limit-categories-include-excerpt-thumbnail/#comments</comments>
		<pubDate>Thu, 29 May 2008 01:54:04 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[Display]]></category>

		<category><![CDATA[Featured]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Posts]]></category>

		<category><![CDATA[Categories]]></category>

		<category><![CDATA[Excerpt]]></category>

		<category><![CDATA[Thumbnail]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=5</guid>
		<description><![CDATA[If you look at the front page of Metro-East.com you will see three short blog excerpts on the right side.  There may not seem to be anything special about these excerpts but there are actually a few interesting things going on here.  I have seen questions about this technique on other blogs so [...]]]></description>
			<content:encoded><![CDATA[<p>If you look at the front page of <a href="http://www.metro-east.com">Metro-East.com</a> you will see three short blog excerpts on the right side.  There may not seem to be anything special about these excerpts but there are actually a few interesting things going on here.  I have seen questions about this technique on other blogs so I will try show you how to:</p>
<ul>
<li>Limit the Categories that the Posts are displayed from.</li>
<li>Limit the number of Posts shown.</li>
<li>Include a text blurb (Excerpt).</li>
<li>Include a thumbnail.</li>
</ul>
<p>There are any number of reasons you might want to do this but in my case I want to show Posts from featured blogs on the front page.  (Maybe you have a new blogger and you don't want his/her posts hitting the front page until you make sure their content is up to your standards.)  I also want to conserve space and use a "teaser" to get the reader to click to a new page.  The thumbnail is mainly for aesthetics but should also increase clickthrough behavior.</p>
<p>I guess the standard operating procedure in a tutorial like this would be to make you wait for the good stuff until the end, but I won't torment you so.  If all you wanted was the code, here it is in its entirety:</p>
<div class="igBar"><span id="lhtml-30"><a href="#" onclick="javascript:showPlainTxt('html-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-30">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">&lt;h3</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"border4"</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">&lt;b&gt;</span></a></span>Recent Blog Entries<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/b&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"blogcategorycontent"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"margin-bottom:11px;background: #F5F5F5;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php $posts = query_posts<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'cat=227,266&amp;showposts=3'</span><span style="color: #66cc66;">&#41;</span>; if <span style="color: #66cc66;">&#40;</span> have_posts<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> : while <span style="color: #66cc66;">&#40;</span> have_posts<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> : the_post<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"post"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"border: 1px solid #CCCCCC;margin-bottom:2px;padding:5px;background: #F5F5F5;"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"post-&lt;?php the_ID(); ?&gt;</span>&quot;&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;h2&gt;</span><span style="color: #009900;">&lt;u&gt;</span><span style="color: #009900;">&lt;a href="</span><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_permalink<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>&quot; title=&quot;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>&quot;&gt;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/u&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h2&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"font-size:10px;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>From: <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_category<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">', '</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"entry"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"introIMG2"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"background: #FFFFFF;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_excerpt<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"font-size:10px;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_content_rss<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">''</span>, TRUE, <span style="color: #ff0000;">''</span>, <span style="color: #cc66cc;color:#800000;">40</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"right"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">&lt;b&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/u.html"><span style="color: #000000; font-weight: bold;">&lt;u&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"&lt;?php the_permalink() ?&gt;</span>&quot; title=&quot;Read More&quot;&gt;Read More<span style="color: #009900;">&lt;/a&gt;</span><span style="color: #009900;">&lt;/u&gt;</span><span style="color: #009900;">&lt;/b&gt;</span><span style="color: #009900;">&lt;/p&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;/div&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;/div&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;?php endwhile; ?&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;?php else : ?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;div class="</span>post<span style="color: #ff0000;">"&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;div class="</span>postMeta<span style="color: #ff0000;">"&gt;</span><span style="color: #009900;">&lt;span class="</span>date<span style="color: #ff0000;">"&gt;</span>No Matches<span style="color: #009900;">&lt;/span&gt;</span><span style="color: #009900;">&lt;/div&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;h2&gt;</span>No matching results<span style="color: #009900;">&lt;/h2&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;div class="</span>entry<span style="color: #ff0000;">"&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;p&gt;</span>You seem to have found a mis-linked page or search query with no associated results. Please trying your search again. If you feel that you should be staring at something a little more concrete, feel free to email the author of this site or browse the archives.<span style="color: #009900;">&lt;/p&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;/div&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;/div&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;?php endif; ?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;">&lt;/div&gt;</span> </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now if you would like an explanation for what is going on in that code, I will try my best to give you one.</p>
<p>This line is known to Wordpress users as The Loop:</p>
<div class="igBar"><span id="lphp-31"><a href="#" onclick="javascript:showPlainTxt('php-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-31">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#0000FF;">$posts</span> = query_posts<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'cat=227,266&amp;showposts=3'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> have_posts<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> : <span style="color:#616100;">while</span> <span style="color:#006600; font-weight:bold;">&#40;</span> have_posts<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> : the_post<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically, it is our way of telling Wordpress what posts to display.  (We feed things into The Loop and we get things out of The Loop.)<br />
<strong><br />
In this case, we want to feed certain Categories into The Loop, as well as a Post limit.</strong></p>
<p>We want to show the Categories "Brian Bailey's Blog" and "Events Blog" and we only want to display a total of 3 Posts from those Categories.  To do this we just need to know the ID for each Category.  We can do this by going to our Manage > Categories page and holding our cursor over the Category name.  At the very bottom of the window we will see the preview URL and the last piece of that URL will read "?action=edit&#038;cat_ID=#" where # is our Category ID.  In this case those IDs are 227 and 266, respectively.  We also want to limit the total number of Posts to 3.<br />
<em><br />
Plug those numbers into The Loop code shown above and we have successfully limited the number of Posts to display and the Categories to display them from.</em></p>
<p><strong>Next we want to include a text blurb, or Excerpt.</strong></p>
<p>This is where it gets just a tiny bit tricky.  I'm sure there are other ways to do this (that's one of the things I love about Wordpress) but with this method we will be using a little-used technique to display the Excerpt.  Why?  Because we are going to need to use the "standard" method normally reserved for the Excerpt in order to display the thumbnail.</p>
<p>We use this line of code from above to display the text:</p>
<div class="igBar"><span id="lphp-32"><a href="#" onclick="javascript:showPlainTxt('php-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-32">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> the_content_rss<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">''</span>, <span style="color:#000000; font-weight:bold;">TRUE</span>, <span style="color:#FF0000;">''</span>, <span style="color:#CC66CC;color:#800000;">40</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>There are a couple of cool things about this.  First, this method will only display text because as you can see, we are using the RSS feed to generate our Excerpt.  RSS feeds (almost always) are comprised of text.  Secondly, we can limit the amount of text displayed.  In this case I have limited the text to 40 characters.  Simply choose your own number here as appropriate.<br />
<em><br />
Thus we have completed our Excerpt.</em></p>
<p><strong>Lastly, we want to include a Thumbnail.</strong></p>
<p>We will use this code as shown above:</p>
<div class="igBar"><span id="lphp-33"><a href="#" onclick="javascript:showPlainTxt('php-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-33">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> the_excerpt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now you see why we did not use 'the_excerpt' for our text.  We are going to use 'the_excerpt' as a simple method to display a Thumbnail.</p>
<p>When we write our post we simply scroll down to the Excerpt section and fill it in with HTML image code, such as:</p>
<div class="igBar"><span id="lhtml-34"><a href="#" onclick="javascript:showPlainTxt('html-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-34">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"http://www.metro-east.com/images/imagefilename.gif"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><em>When we publish our post Wordpress will automatically display the Thumbnail just as you see it on the front page of Metro-East.com.</em><br />
<strong><br />
You can make your life a whole lot easier if you note the code wrapped around 'the_excerpt' code:</strong></p>
<div class="igBar"><span id="lhtml-35"><a href="#" onclick="javascript:showPlainTxt('html-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-35">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"introIMG2"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"background: #FFFFFF;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>?php the_excerpt<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The 'class="introIMG2"' code is CSS styling that I have applied to 'the_excerpt'.  Here is that CSS code:</p>
<div class="igBar"><span id="lcss-36"><a href="#" onclick="javascript:showPlainTxt('css-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-36">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.introIMG2<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">width</span>:75px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">height</span>:75px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">float</span>:<span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">margin-right</span>:8px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">overflow</span>:<span style="color: #993333;">hidden</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">border</span>: 1px <span style="color: #993333;">solid</span> #CCCCCC;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This CSS styling forces 'the_excerpt' to display as a 75x75 pixel image, along with a border and other styling as shown.  Why did I do this?  Because when I uploaded the images to use as the Thumbnail, I saved them as 75x75 pixel images.  <em>Then everything fit perfectly and none of the images are distorted.  Groovy, eh?</em></p>
<p>Most of this can be figured out with just a little bit of work.  That's how I managed to do it, and so can you.  It's not the most impressive piece of coding under the sun but I strongly feel that the little things make all the difference when you're trying to give a professional presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/limit-categories-include-excerpt-thumbnail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display the Oodle API with Wordpress using Custom Fields</title>
		<link>http://wordpressintocms.com/display-the-oodle-api-with-wordpress-using-custom-fields/</link>
		<comments>http://wordpressintocms.com/display-the-oodle-api-with-wordpress-using-custom-fields/#comments</comments>
		<pubDate>Fri, 23 May 2008 15:33:06 +0000</pubDate>
		<dc:creator>Brian Bailey</dc:creator>
		
		<category><![CDATA[API]]></category>

		<category><![CDATA[Admin]]></category>

		<category><![CDATA[Display]]></category>

		<category><![CDATA[Headline]]></category>

		<category><![CDATA[Oodle]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Classifieds]]></category>

		<category><![CDATA[Custom Fields]]></category>

		<guid isPermaLink="false">http://wordpressintocms.com/?p=3</guid>
		<description><![CDATA[There is very little documentation available on the Oodle API.  The official Yahoo discussion group is useful to an extent but there isn't much going on over there.  There is, however, some decent documentation at the Oodle developer center.
*Disclaimer:  I am not an expert programmer.  Far from it- everything I've learned [...]]]></description>
			<content:encoded><![CDATA[<p><em>There is very little documentation available on the Oodle API.  The <a title="Oodle Yahoo Discussion Group" href="http://tech.groups.yahoo.com/group/oodleapi/" target="_blank">official Yahoo discussion group</a> is useful to an extent but there isn't much going on over there.  There is, however, some decent documentation at the <a title="Oodle developer center" href="http://developer.oodle.com/welcome-oodle-developers" target="_blank">Oodle developer center</a>.</em></p>
<p>*Disclaimer:  I am not an expert programmer.  Far from it- everything I've learned I taught myself through trial and error and the powers of Google search.  Hopefully that fact will make these articles even more useful to a lot of people because I will be able to relate to folks who are struggling through things just like I am.</p>
<p><strong>Here is how I was able to coax Oodle into dynamically displaying classified ads for each Wordpress Post.</strong></p>
<p><span id="more-3"></span>First, some notes on my website structure will help elucidate just what is going on here and why I am doing what I am doing.</p>
<p>The site is a local page displaying, among other things, items that are for sale in the area.</p>
<p>I have the site broken down into Categories which are very similar to the classified sections in a newspaper.  For example, I have a Motorcycles Category that contains Posts for brands of motorcycles, like these:</p>
<blockquote><p><a href="http://www.Metro-East.com/Motorcycles/Kawasaki-Motorcycles">http://www.Metro-East.com/Motorcycles/Kawasaki-Motorcycles</a></p>
<p><a title="Metro-East.com Ducati" href="http://www.Metro-East.com/Motorcycles/Ducati" target="_blank">http://www.Metro-East.com/Motorcycles/Ducati-Motorcycles</a></p></blockquote>
<p>Here is what I do:</p>
<p>I have a special Template that I use for each Category.  This means that I can edit the Motorcycles Template and then every Post in the category uses that Template.  (There are a lot of other conditional things I have going on with these pages, but we can get into that in another article, as none of it is important here.)</p>
<p>So, for example, in the Kawasaki-Motorcycles Post I insert my content (in this case, eBay listings) and then the Category Template wraps around that Post.</p>
<p>Next, I want the Category Template to display some classified ads from Oodle that relate to the Post content, which in this case is Kawasaki Motorcycles.</p>
<p>*Note:  The reason I am dealing with the Category Template is that I only want to edit one file (in this case the Motorcycles Category Template) and have it work its magic <em>for every Post in that Category</em>.  The other reason is that without using some fairly nasty plugins <em>you cannot execute PHP in Wordpress Posts</em>.  You can only execute PHP in Templates.</p>
<p><strong>So the question is, "How do I get Oodle to know what is in the content of the Post and then display relevant classified ads?"</strong></p>
<p>The solution I arrived at was to use Custom Fields.</p>
<p>As you will see, this method will allow us to dynamically list Oodle classified ads based on the Post content and best of all it will be as easy as typing a few extra words when we create our Post.</p>
<p>In this case, I:</p>
<ol>
<li> Went into the Edit page for my Kawasaki-Motorcycles Post and scrolled down to Custom Fields.</li>
<li>Typed "oodlekeyword" (without the quotes) into the Key section and typed "kawasaki" (without the quotes) into the Value section.</li>
<li>Clicked 'Add Custom Field'.</li>
</ol>
<p>Having done this I had successfully told Wordpress that the "oodlekeyword" for the Kawasaki-Motorcycles Post was "kawasaki".  Wordpress then stored this information so that I could use it in the future.</p>
<p>(*Note:  I chose to use "oodlekeyword" but you could use anything you want... like "oodle" "oodlead" "classified" or "banana", just as long as you are consistent with its usage later.)</p>
<p>Next, I pasted my Oodle API code into my Motorcycles Category Template in the location I wanted my classified ads to appear.  (In this case, directly beneath the Post content so as to create a near-seamless set of listings.)</p>
<p>I have highlighted the line where I injected the Custom Fields information into the code.</p>
<blockquote><p>// calls the oodle class available from Oodle<br />
include("oodle_api_php5.php");</p>
<p>//set number of pics to show<br />
$showlimit=100;</p>
<p>//Set your date you want to check<br />
$startdate=strtotime('-4 weeks');<br />
$enddate=strtotime('now');</p>
<p>//*************** Settings - Customize them to fit your needs!</p>
<p>$oodleApi = new OodleApi();<br />
// prepare a "get()" method call to the Oodle API<br />
$filters['partner_id'] = 'Your-API-Key-From-Oodle-Goes-Here';<br />
$filters['region'] = 'usa';<br />
$filters['from'] = '0';<br />
$filters['to'] = '200';<br />
$filters['category'] = 'vehicle/motorcycle';<br />
<strong>$filters['q'] = get_post_meta($post-&gt;ID, oodlekeyword, TRUE);</strong><br />
$filters['filters'][] =<br />
array('type'=&gt;'distance','params'=&gt;array('value' =&gt; '50', 'units' =&gt; 'mi', 'zip' =&gt; '62234'));<br />
$filters['create_time'][] =<br />
array('type'=&gt;'create_time','params'=&gt;array('low' =&gt; $startdate,'high'<br />
=&gt; $enddate));<br />
$filters['filters'][] =<br />
array('type'=&gt;'source','params'=&gt;array('exclude'=&gt;array('ebay')));<br />
$sort['sort'][] = array('key'=&gt;'create_time','reverse'=&gt;false);</p>
<p>$response=$oodleApi-&gt;make_request('get',$filters,$sort);</p>
<p>//this loop sorts<br />
//through the results and only shows those with<br />
//pictures, and limits the number shown to 30...of course you can<br />
//change this however you like...</p>
<p>$piccount=0;<br />
foreach ($response['items'] as $key=&gt;$ad) {<br />
$picprinted=false;<br />
foreach($ad as $key=&gt;$val) {<br />
if (($ad['thumb']) and<br />
(!$picprinted) and ($piccount&lt;$showlimit)) {</p>
<p>echo '&lt;div style="width:620px;margin-left:7px;margin-bottom:10px;border-top:1px solid #CCCCCC;padding-top:5px;"&gt;&lt;span style="float:right;width:495px;" align="left"&gt;&lt;b&gt;'.$ad['title'].'&lt;/b&gt;&lt;br/&gt;$'.$ad['price'].'&lt;br/&gt;'.$ad['locationcity'].'&lt;br/&gt;&lt;a href="'.$ad['url'].'" target="_blank"&gt;&lt;font color="gray"&gt;&lt;u&gt;See Full Details&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="width:125px;"&gt;&lt;a href="'.$ad['url'].'" target="_blank"&gt;&lt;img src="'.$ad['thumb'].'" title="From: '.$ad['locationcity'].' on '.$ad['source'].' "border="0"/&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;br/&gt;&lt;span style="width:620px;"&gt;'.$ad['sbody'].'&lt;/span&gt;&lt;/div&gt;';<br />
$picprinted=true;<br />
$piccount++;<br />
}</p>
<p>}</p>
<p>}</p></blockquote>
<p>This highlighted line tells Oodle to display the ads that not only adhere to all of the other $Filters I have used, but also to narrow the search down even more by only showing ads which relate to the Custom Field "oodlekeyword".  Having already set the "oodlekeyword" to "kawasaki" for Kawasaki-Motorcycles, Oodle knows to only display ads that match "kawasaki".</p>
<p>Now this is where the magic comes into play.  Without changing a single line of code, if you click on any<em> </em>Motorcycle Post it will automatically display the relevant classified ads <em>as long as you took a couple of seconds to specify the Custom Field when you wrote the Post.</em></p>
<p>If you click on the Ducati Motorcycles Post Oodle will display Ducati Motorcycle ads because I entered the Custom Field "ducati" in the post and we told Oodle to display only those items which match the Custom Field, and so forth for each Post in the Category.</p>
<p>Now all that remains is to alter the Oodle API code for other Category Templates and to remember to include a Custom Field value for the key "oodlekeyword" when I write each post.  (Every post in the Video Games Category, for example, will use the Video Games Category Template so I will edit only that one file to use very similar Oodle API code, changing it only to reflect a new category.  Thus, <em>$filters['category'] = 'vehicle/motorcycle'; </em>will become <em>$filters['category'] = '<code>sale/entertainment/video_game</code></em><em>'; </em>as per the <a title="Oodle Category List" href="http://developer.oodle.com/categories-list" target="_blank">Oodle category list</a>.)</p>
<p>I hope I did an adequate job of explaining this.  I probably over-explained some parts and under-explained others, so I apologize for that.  Please offer any questions or tips in the comments below.</p>
<ul>
<li>Here is the official documentation on Custom Fields at Wordpress: <a title="Using Custom Fields" href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">Using Custom Fields</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wordpressintocms.com/display-the-oodle-api-with-wordpress-using-custom-fields/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
