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

<channel>
	<title>Code With Design &#187; wordpress</title>
	<atom:link href="http://codewithdesign.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://codewithdesign.com</link>
	<description>web application development blog by Caleb Jonasson</description>
	<lastBuildDate>Fri, 11 May 2012 12:28:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Adding The &#8216;Like&#8217; Button to WordPress</title>
		<link>http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/</link>
		<comments>http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 18:41:55 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook like]]></category>
		<category><![CDATA[installing like button]]></category>
		<category><![CDATA[theme like button]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=436</guid>
		<description><![CDATA[TweetPlugins can often slow down WordPress&#8217; load times so it best to build into the theme if possible. This is why we are going to run through a quick tutorial were we will be adding a like button to a WordPress theme. Getting The Like Button Code The first thing that you are going to [...]
Related posts:<ol>
<li><a href='http://codewithdesign.com/2011/06/29/googles-plus-1-button-integration-and-options/' rel='bookmark' title='Google&#8217;s Plus 1 Button Integration And Options'>Google&#8217;s Plus 1 Button Integration And Options</a></li>
<li><a href='http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/' rel='bookmark' title='Creating multiple sidebar menus in wordpress'>Creating multiple sidebar menus in wordpress</a></li>
<li><a href='http://codewithdesign.com/2009/12/30/creating-a-top-button/' rel='bookmark' title='Creating a top button'>Creating a top button</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Adding The &#8216;Like&#8217; Button to WordPress" data-via="" data-url="http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/"></g:plusone></div><p>Plugins can often slow down WordPress&#8217; load times so it best to build into the theme if possible. This is why we are going to run through a quick tutorial were we will be adding a like button to a WordPress theme.</p>
<h2>Getting The Like Button Code</h2>
<p>The first thing that you are going to need is the like button code itself. I will be providing it for you but if you would like to go and get it yourself there are some more customization options by <a href="http://developers.facebook.com/docs/reference/plugins/like">going to the Facebook developer page.</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>iframe src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.facebook.com/widgets/like.php?href=http://skorg.org/&quot;</span>
scrolling<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;no&quot;</span> frameborder<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span>
style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;border:none; width:480px; height:80px&quot;</span><span style="color: #339933;">&gt;&lt;/</span>iframe<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Now we need to find a good place for our like button to go. I would recommend placing it below the post so once the user has completed reading through the article they can then like it. If you put it above there is a chance that they are going to miss the button and just move on.</p>
<p>The button is going to be added to the bottom of the post on the single.php page that you can find in your theme directory. Just go to &#8216;/wp-content/themes/your-theme-name/single.php&#8217;.</p>
<p>Now we will simply add the code in and tweak a couple of things so it will work on each page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;iframe src=&quot;http://www.facebook.com/widgets/like.php?href=<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;
scrolling=&quot;no&quot; frameborder=&quot;0&quot;
style=&quot;border:none; width:480px; height:80px&quot;&gt;&lt;/iframe&gt;</pre></td></tr></table></div>

<h2>Adding the Code to Your Theme</h2>
<p>The code will be inserted and your single page should look something more like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;   
	&lt;div class=&quot;meta-entry clear&quot;&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span>
			<span style="color: #666666; font-style: italic;">//full post</span>
        	the_content<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'read more...'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'skorg-cwd1'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;iframe src=&quot;http://www.facebook.com/widgets/like.php?href=<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;
        scrolling=&quot;no&quot; frameborder=&quot;0&quot;
        style=&quot;border:none; width:480px; height:80px&quot;&gt;&lt;/iframe&gt;
&nbsp;
       	<span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'skorg-cwd1'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_link_pages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;&lt;!--end entry--&gt;
	&lt;div class=&quot;post-footer&quot;&gt;</pre></td></tr></table></div>

<h2>Notes</h2>
<p>When inserting the post just look for something call the_content() then simply past the code bellow this and your like button should work without a flaw.</p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=436&type=feed" alt="" /><p>Related posts:<ol>
<li><a href='http://codewithdesign.com/2011/06/29/googles-plus-1-button-integration-and-options/' rel='bookmark' title='Google&#8217;s Plus 1 Button Integration And Options'>Google&#8217;s Plus 1 Button Integration And Options</a></li>
<li><a href='http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/' rel='bookmark' title='Creating multiple sidebar menus in wordpress'>Creating multiple sidebar menus in wordpress</a></li>
<li><a href='http://codewithdesign.com/2009/12/30/creating-a-top-button/' rel='bookmark' title='Creating a top button'>Creating a top button</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating multiple sidebar menus in wordpress</title>
		<link>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/</link>
		<comments>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/#comments</comments>
		<pubDate>Sat, 22 May 2010 16:48:55 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[dynamic menus]]></category>
		<category><![CDATA[footer menu]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=403</guid>
		<description><![CDATA[Creating additional dynamic menus for a wordpress template.
Related posts:<ol>
<li><a href='http://codewithdesign.com/2010/01/15/creating-user-input-with-menus-in-java/' rel='bookmark' title='Creating user input with menus in java'>Creating user input with menus in java</a></li>
<li><a href='http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/' rel='bookmark' title='Adding The &#8216;Like&#8217; Button to WordPress'>Adding The &#8216;Like&#8217; Button to WordPress</a></li>
<li><a href='http://codewithdesign.com/2011/05/20/php-array-of-bad-words/' rel='bookmark' title='PHP: Array Of Bad Words'>PHP: Array Of Bad Words</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Creating multiple sidebar menus in wordpress" data-via="" data-url="http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/"></g:plusone></div><p>In this tutorial I won&#8217;t just be making a sidebar menu, but three additional menus that will be placed side by side in the footer. Unfortunately the code for this is not as easy as it may seem. The possibility of creating the sidebars through only your footer.php and sidebar.php is not going to happen. Fortunately the code is very simple and involves a lot of copy and pasting with a couple modifications.</p>
<p>For this tutorial I will be using wordpress 2.9.2 (currently the latest release)</p>
<p>When creating multiple &#8220;sidebars&#8221; You only need to do two things. The first thing is to edit the functions.php page, and the second is to edit the HTML where the sidebar/dynamic menu will be placed.</p>
<p>The first thing that we will be doing is opening our functions.php page. The code for one sidebar should look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar_widget'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cwj'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'normal_sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The next thing we will need to do is modify this code so we can have four dynamic menus throughout our WordPress theme. We will need to copy and paste the array and change out the name and the ID to something new and exciting. Because the menus will be placed in my footer I will be calling them &#8220;Footer1&#8243; etc for each menu. The ID can be anything as long as it is unique to that specific menu. If you have two menus with the same ID you will only be able to add widgets to the last referenced menu.﻿</p>
<p>The code should now look something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar_widget'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'normal_sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar1'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar2'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CJDesign-dark1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'col_sidebar3'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The next stage in this tutorial is to quickly and easily insert the line of code to display your newly created dynamic menus. Just place this into the HTML where you would like it to be.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>You simply need to replace where I have Footer3 with the name of the sidebar that you previously created with the function.</p>
<p>The sidebar now looks as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer1'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer2'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;footer-col&quot;&gt;
	&lt;ul&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Footer3'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/ul&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>And the widgets can be modified through the WordPress widget page.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.32.17-AM.png" rel="lightbox[403]"><img class="alignnone size-medium wp-image-405" title="Widget page showing 3 footer menus" src="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.32.17-AM-600x378.png" alt="&lt;img&gt;" width="600" height="378" /></a></p>
<p>And the final product.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.31.58-AM.png" rel="lightbox[403]"><img class="alignnone size-medium wp-image-404" title="Wordpress 3 sidebar footer" src="http://codewithdesign.com/wp-content/uploads/2010/05/Screen-shot-2010-05-22-at-9.31.58-AM-600x172.png" alt="&lt;img&gt;" width="600" height="172" /></a></p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=403&type=feed" alt="" /><p>Related posts:<ol>
<li><a href='http://codewithdesign.com/2010/01/15/creating-user-input-with-menus-in-java/' rel='bookmark' title='Creating user input with menus in java'>Creating user input with menus in java</a></li>
<li><a href='http://codewithdesign.com/2010/09/23/adding-the-like-button-to-wordpress/' rel='bookmark' title='Adding The &#8216;Like&#8217; Button to WordPress'>Adding The &#8216;Like&#8217; Button to WordPress</a></li>
<li><a href='http://codewithdesign.com/2011/05/20/php-array-of-bad-words/' rel='bookmark' title='PHP: Array Of Bad Words'>PHP: Array Of Bad Words</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2010/05/22/creating-multiple-sidebar-menus-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Modifying next and previous posts</title>
		<link>http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/</link>
		<comments>http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:01:25 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=231</guid>
		<description><![CDATA[We could change the float class to have a background and a border but that would change everything that uses the float class. In order to change this we are going to have to create new classes and change the index code. For this I will be changing the index code to "post_new_entries" and "post_old_entries."
Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
<li><a href='http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/' rel='bookmark' title='Remove images and increase load times with CSS3'>Remove images and increase load times with CSS3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Modifying next and previous posts" data-via="" data-url="http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/"></g:plusone></div><p>For most standard WordPress themes you are stuck with a boring text on the bottom of the screen with a float left and right property. This simple float looks boring however it is a simple solution for going from page to page.</p>
<p><img class="alignnone size-full wp-image-232" title="older-entries1" src="http://codewithdesign.com/wp-content/uploads/2009/12/older-entries1.jpg" alt="" width="379" height="83" /></p>
<p>The below image is what my personal blog used to have for a page navigation. This was to simple for what I wanted which made me want to change it to fit the rest of the page style. The solution was a work through of the CSS requiring a little CSS3 to make the borders rounded.</p>
<p>The final result looks as follows:</p>
<p><img class="alignnone size-full wp-image-233" title="older-entries2" src="http://codewithdesign.com/wp-content/uploads/2009/12/older-entries2.jpg" alt="" width="333" height="98" /></p>
<p>The first thing we are going to need to do is open up the style.css and the index.php inside of the theme you are intending to modify.</p>
<p><strong>WordPress Root -&gt; wp-content -&gt; themes -&gt; theme_name</strong></p>
<p>Once you have opened up the two files, refer to the index.php and scroll down past the post loops to get to your code that checks for posts and allows you to go forward and backwards in post history. The code should look as follows:</p>
<blockquote><p>&lt;div&gt;<br />
&lt;h5 class=&#8221;float-right&#8221;&gt;<br />
&lt;?php previous_posts_link(&#8216;Newer Entries &amp;rarr;&#8217;) ?&gt;<br />
&lt;/h5&gt;<br />
&lt;h5 class=&#8221;float-left&#8221;&gt;<br />
&lt;?php next_posts_link(&#8216;&amp;larr; Older Entries&#8217;) ?&gt;<br />
&lt;/h5&gt;<br />
&lt;div&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>As you can see there is a float class above which is in our css file as:</p>
<blockquote><p>.float-right {</p>
<p>float:right;</p>
<p>}</p></blockquote>
<p>We could change the float class to have a background and a border but that would change everything that uses the float class. In order to change this we are going to have to create new classes and change the index code. For this I will be changing the index code to &#8220;post_new_entries&#8221; and &#8220;post_old_entries.&#8221;</p>
<p>The &#8220;index.php&#8221; will now look something like this:</p>
<blockquote><p>&lt;div&gt;<br />
&lt;h5 class=&#8221;post_new_entries&#8221;&gt;<br />
&lt;?php previous_posts_link(&#8216;Newer Entries &amp;rarr;&#8217;) ?&gt;<br />
&lt;/h5&gt;<br />
&lt;h5 class=&#8221;post_old_entries&#8221;&gt;<br />
&lt;?php next_posts_link(&#8216;&amp;larr; Older Entries&#8217;) ?&gt;<br />
&lt;/h5&gt;<br />
&lt;div&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>The final thing to do in this modification is to create the classes inside of the &#8220;style.css&#8221; file. The first thing that is required for the modification is for us to make them float to their designated sides just like the previous floats from before.</p>
<blockquote><p>.post_old_entries {<br />
float:left;<br />
font:bold 20px/20px Georgia, &#8220;Times New Roman&#8221;, Times, serif;<br />
}</p></blockquote>
<p>The rest of the code is fully customizable and up to you. There is always the option of adding hovers and link colors as well as paddings, backgrounds and borders. The code that is currently used for code with design is as follows:</p>
<blockquote><p>.post_old_entries {<br />
float:left;<br />
font:bold 20px/20px Georgia, &#8220;Times New Roman&#8221;, Times, serif;<br />
margin-left:-31px;<br />
padding:5px 15px;<br />
background: #f2f2f2;<br />
border: 1px solid #ddd;<br />
-moz-border-radius-topright: 5px;<br />
-webkit-border-top-right-radius:5px;<br />
-moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px;<br />
}<br />
.post_old_entries a{<br />
color:#666666;<br />
}<br />
.post_old_entries a:hover {<br />
color:#333333;<br />
}<br />
.post_new_entries {<br />
float:right;<br />
font:bold 20px/20px Georgia, &#8220;Times New Roman&#8221;, Times, serif;<br />
margin-right:-31px;<br />
padding:5px 15px;<br />
background: #f2f2f2;<br />
border: 1px solid #ddd;<br />
-moz-border-radius-topright: 5px;<br />
-webkit-border-top-right-radius:5px;<br />
-moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px;<br />
}<br />
.post_new_entries a {<br />
color:#666666;<br />
}<br />
.post_new_entries a:hover {<br />
color:#333333;<br />
}</p></blockquote>
<p>Best of luck with your WordPress modifications.</p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=231&type=feed" alt="" /><p>Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
<li><a href='http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/' rel='bookmark' title='Remove images and increase load times with CSS3'>Remove images and increase load times with CSS3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a community that users are hungry for</title>
		<link>http://codewithdesign.com/2009/11/13/creating-a-community-that-users-are-hungry-for/</link>
		<comments>http://codewithdesign.com/2009/11/13/creating-a-community-that-users-are-hungry-for/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 19:19:28 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[articles]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[contribution]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[rank]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=138</guid>
		<description><![CDATA[TweetBefore I get to in depth I would like to quickly revise what I will be getting into. There are three main things your users need for your community go grow. The first and foremost is allowing your users to contribute, the second is community rank and social status. The third and final topic is [...]
Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/' rel='bookmark' title='Stop Spammers From Attacking Your WP Blog'>Stop Spammers From Attacking Your WP Blog</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
<li><a href='http://codewithdesign.com/2010/02/26/pre-planning-websites/' rel='bookmark' title='Pre planning websites'>Pre planning websites</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Creating a community that users are hungry for" data-via="" data-url="http://codewithdesign.com/2009/11/13/creating-a-community-that-users-are-hungry-for/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2009/11/13/creating-a-community-that-users-are-hungry-for/"></g:plusone></div><p>Before I get to in depth I would like to quickly revise what I will be getting into. There are three main things your users need for your community go grow. The first and foremost is allowing your users to contribute, the second is community rank and social status. The third and final topic is generating something to get their attention.</p>
<h2>contribution</h2>
<p>Allowing users to contribute is really needed, not only does it increase the amount of data in your site but it will give your users more things to do and or read when they are visiting your site. The more content that your site consists of will increase your page rank on larger search engines. User contributions also adds to another main point which is user rank and social status and it does this by giving you (the admin) the ability to decide who is a good enough poster for a promotion, the ability to write a blog post or become a moderator etc.. One of the biggest reasons to allow user contributions is that it gives potential users something to go through and the possibility to become a part of something.</p>
<h2>Social status and rank</h2>
<p>So now that your users are given the ability to contribute you may now proceed to social status and member rank. Everyone wants to feel important and this is your way to give something to the community. Whether you name the points cookies or Kudos (Reference to Dream.In.Code) you should have it originally named or based on the theme of your site. How you base the point system is entirely up to you but keep in mind that you will be receiving some rather large numbers if you decide to hand out 5 points per post. The method that I prefer to give out  is 0.1 per post and 1 point for something larger. (ie. Discussion starter, Tutorial, Popular Blog Post) Rewards and bonus’ are a nice way to reward members also try giving out ranks and titles to the members of your community, they love that kind of thing. As users progress through the ranks they should be able to progress through the community and unlock new abilities such as moderate posts, mark as spam, rate content and try making a verified quality post area on the main page or a spotlight post section where top contributors that deliver quality posts have a place to shine.</p>
<h2>Quality of content</h2>
<p>The final thing needed to create a community is something to catch new users attention. This can be anything from quality posts to contests to freebies/giveaways. Another thing that gets new users attention are some sleek looking graphics  and a well thought out layout. For example one of the highest density click populations on a blog is the top of the right side bar. This is a good place to place internal site links to catch the eyes of people that are interested in similar topics. It is better to promote your own site and your own content rather then to have space wasted for advertisements, especially if your site doesn’t have a lot of visitors.</p>
<p>Now that you know the basic concepts of how to draw in users, get them to stay and support your community, there are only a few more things needed. The first is user input, this can drastically change the way you think about layouts and the content that your site provides. The second is search engine optimization, this will actually bring people into your site from the search engines. The final thing needed is a good idea. Your site isn’t going to get off the ground if it doesn’t have a good idea and motivated people behind it.</p>
<p>Caleb Jonasson</p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=138&type=feed" alt="" /><p>Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/' rel='bookmark' title='Stop Spammers From Attacking Your WP Blog'>Stop Spammers From Attacking Your WP Blog</a></li>
<li><a href='http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/' rel='bookmark' title='Creating a Single Page login – Design View'>Creating a Single Page login – Design View</a></li>
<li><a href='http://codewithdesign.com/2010/02/26/pre-planning-websites/' rel='bookmark' title='Pre planning websites'>Pre planning websites</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2009/11/13/creating-a-community-that-users-are-hungry-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop Spammers From Attacking Your WP Blog</title>
		<link>http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/</link>
		<comments>http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:45:42 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spammers]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yandex.ru]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=132</guid>
		<description><![CDATA[TweetIntroduction More and more users on WordPress are getting spammed and now I have a few tips on how to prevent this from happening to you. There are two general ways that people have their blogs set up one is more reliable then the other. the first setup is where users don’t need to log [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Stop Spammers From Attacking Your WP Blog" data-via="" data-url="http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/"></g:plusone></div><p><strong>Introduction</strong></p>
<p>More and more users on WordPress are getting spammed and now I have a few tips on how to prevent this from happening to you. There are two general ways that people have their blogs set up one is more reliable then the other. the first setup is where users don’t need to log in and all that is provided is a username, email and a website is optional. The second setup requires the reader to register prior to submitting a comment on anything. This is the more secure method to choose from.</p>
<p><a href="http://codewithdesign.com/wp-content/uploads/2009/11/stop-wordpress-spammer.jpg" rel="lightbox[132]"><img class="alignnone size-full wp-image-135" title="stop wordpress spammer" src="http://codewithdesign.com/wp-content/uploads/2009/11/stop-wordpress-spammer.jpg" alt="stop wordpress spammer" width="600" height="200" /></a></p>
<p><strong>Setup Number One</strong></p>
<p>The first setup has some flaws but the spammers can be prevented. WordPress is setup so that once a poster has been approved through its IP address they will be accepted in the system. When they are accepted the users can post without being manually accepted. Because of this you should hold the comments for moderation for up to two days. There are some signs as to suspicious user activity these signs consist of posts that have a site end with anything other then the regular .com, .org etc. Also if the email has a lot of one letter repeating then it is most likely a spammer. The reason you want to wait multiple days before accepting posts from a user is so you can check the IP address coming from multiple posters. Generally if someone posts multiple times on the same blog post and they are not contributing anything to a discussion they are spammers who picked up on a permanent link and are monitoring the posts to see if they have gotten through just by posting and being accepted into the system.</p>
<p><strong>The Second Setup</strong></p>
<p>In this setup your users must register to your blog and fill out their username and password. It is much more secure because the spammers are more likely going to just find another blog rather then waste their time trying to get a post worthy account. I recommend going with this setup if you have something to offer regular users, However it may be best to keep the first setup until your community begins to grow. Without a community you are just going to have a blog with no discussions and/or comments.</p>
<p><strong>Stop The Spam</strong></p>
<p>There are some methods that you can use to prevent spam from happening. The first best thing that you can do is install Akismet. This is a WordPress plugin that checks your comments against the Akismet web service. This will check to see if the comment is spam or not. The only downfall is that you will require a WordPress API key. These are easy enough to get your hands, you just need to visit the WordPress site. Another method is to open up your admin page, locate the settings area on the left sidebar, click discussion. Now fill in the comment moderation as you see fit. On blacklist I have set the yandex.ru mail service because the only page requests from Russia are all spam related. Within the moderation section you should enter in all of the bad words you can think of. Another way to stop spam is to install yet another plugin. Math Comment Spam is a plugin that requires the user to answer a simple math equation before posting a comment. This stops a lot of spammers in their tracks but there are some that do get by.  This plugin is a little annoying to install because it requires that you modify the comment or post page within your theme. There are step by step instructions on achieving this. The final thing that you can do to prevent spam is moderate the comments properly and use your best judgement. Don’t immediately accept positive feedback just because it is there. This is how spammers work. They gain your trust and then fill your database up with spam.</p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=132&type=feed" alt="" /><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2009/11/13/stop-spammers-from-attacking-your-wp-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Single Page login – Design View</title>
		<link>http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/</link>
		<comments>http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 23:03:58 +0000</pubDate>
		<dc:creator>Caleb Jonasson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codewithdesign.com/?p=40</guid>
		<description><![CDATA[TweetThere are many ways to go about creating a single page login. There are also many different styles that you can use when creating these logins. Before you start it is a good idea to have a good idea of what you are creating, this way you can always use it as a template in [...]
Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/' rel='bookmark' title='Modifying next and previous posts'>Modifying next and previous posts</a></li>
<li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/' rel='bookmark' title='Remove images and increase load times with CSS3'>Remove images and increase load times with CSS3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style = 'float:left; margin-right:5px;'>            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-text="Creating a Single Page login – Design View" data-via="" data-url="http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/" en>Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="tall" href="http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/"></g:plusone></div><p>There are many ways to go about creating a single page login. There are also many different styles that you can use when creating these logins. Before you start it is a good idea to have a good idea of what you are creating, this way you can always use it as a template in case things start to go wrong.</p>
<p><img class="size-full wp-image-41 alignleft" title="wp-login_img" src="http://codewithdesign.com/wp-content/uploads/2009/10/wp-login_img.jpg" alt="wp-login_img" width="378" height="343" /></p>
<p>The design I would like to create is going to consist of the title of the site, a quick description and the forum to login with. For this tutorial I will be creating the login so it will look similar to WordPress’ login screen except it will be off center and there will be no header. These types of login pages are great if the login information is in its own folder or you have a site that requires users to login prior to seeing any of the information.</p>
<p>The first step to creating a login that looks good knowing where the content will be placed. Because I plan on having my content in the middle area of the screen I am going to have to rely on percent based margin properties. After I get all of the padding and margin properties sorted out It will then be time to create a functional and easily useable text.</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;Login || Code With Design&lt;/title&gt;<br />
&lt;link href=&#8221;main.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;div id=&#8221;container&#8221;&gt;<br />
&lt;div id=&#8221;mainContent&#8221;&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>By using the code above you will create the base structure for the design. It contains all of the div tags required to line this all up later with the CSS file. Now all we need to do is create a functioning form that users can enter their password and username.</p>
<blockquote><p>&lt;h1&gt;Code With Design&lt;/h1&gt;<br />
&lt;form id=&#8221;form1&#8243; name=&#8221;form1&#8243; method=&#8221;post&#8221; action=&#8221;somepage.php&#8221;&gt;<br />
&lt;table width=&#8221;375&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td width=&#8221;142&#8243;&gt;&lt;label&gt;<br />
&lt;div align=&#8221;right&#8221;&gt;Username:&lt;/div&gt;<br />
&lt;/label&gt;&lt;/td&gt;<br />
&lt;td width=&#8221;162&#8243;&gt;&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221; id=&#8221;username&#8221; /&gt;&lt;/td&gt;<br />
&lt;td width=&#8221;55&#8243;&gt;&amp;nbsp;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;&lt;label&gt;<br />
&lt;div align=&#8221;right&#8221;&gt;Password:&lt;/div&gt;<br />
&lt;/label&gt;&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;password&#8221; name=&#8221;password&#8221; id=&#8221;password&#8221; /&gt;&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;login&#8221; id=&#8221;login&#8221; value=&#8221;Login&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;h5&gt;&lt;a href=&#8221;somelink.php&#8221;&gt;Lost your password?&lt;/a&gt;&lt;/h5&gt;<br />
&lt;label&gt;&lt;/label&gt;<br />
&lt;/form&gt;</p></blockquote>
<p>If you read over the information above you will notice that the information in the tables has been moved around with the tables and not with the CSS sheet. Whatever method you use is up to you, Normally its safer to go with the CSS method but at the time of creating this login I wanted to keep the CSS clean for creating more login pages.</p>
<blockquote><p>@charset “utf-8″;<br />
body {<br />
font: 100% Plantagenet Cherokee;<br />
background: #ffffff;<br />
margin: 0;<br />
padding: 0;<br />
text-align: center;<br />
color: #000000;<br />
}<br />
body a {<br />
text-decoration:none;<br />
color:#333333;<br />
}<br />
body a:hover {<br />
text-decoration:none;<br />
color:#666666;<br />
}<br />
.oneColElsCtr #container {<br />
width: 100%;<br />
margin: 0 auto;<br />
text-align: left;<br />
}<br />
.oneColElsCtr #mainContent {<br />
padding: 3px 20px;<br />
margin-top:20%;<br />
margin-left:20%;<br />
margin-bottom: 10%;<br />
width:400px;<br />
background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;<br />
}<br />
.oneColElsCtr #mainContent h1 {<br />
background: #ffffff; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;<br />
}<br />
.oneColElsCtr #mainContent input {<br />
font-family: “Plantagenet Cherokee”;<br />
background: #e4edfe;<br />
border: 2px #333 solid;<br />
}</p></blockquote>
<p>Now we are going to go through the CSS file that was entered above. The body is pretty standard here and doesn’t have a whole lot to do with the placement of the login container. The placement of the login container is built up within the one column elastic container main content. If you look at the code you will see that there is padding so the information is not touching the outside of the div. There is also a lot of margins created here and as mentioned above its measurement is percent based. This will help the login div stay within the central areas of the page. There is also a set width, this is so the div doesn’t extend all the way to the right.</p>
<blockquote><p>.oneColElsCtr #mainContent {<br />
padding: 3px 20px;<br />
margin-top:20%;<br />
margin-left:20%;<br />
margin-bottom: 10%;<br />
width:400px;<br />
background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;<br />
}</p></blockquote>
<p>The next thing on the page that you will notice is how the content is wrapped in a round border. This is because of the following code. It is a simple way to make the content rounded inside of your browser. It is also possible to make a border with this style method, however the look of this login is flat so a boarder is not going to be needed.</p>
<blockquote><p>background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;</p></blockquote>
<p>The third and final thing that you will notice is how the login box contains the same font as the rest of the page and the button does not look like a normal forum button. This is because of the following code in the CSS file.</p>
<blockquote><p>.oneColElsCtr #mainContent input {<br />
font-family: “Plantagenet Cherokee”;<br />
background: #e4edfe;<br />
border: 2px #333 solid;<br />
}</p></blockquote>
<p>It forces the input properties within the MainContent to have a background that matches that of the rest of the page and also creates square borders around the button and input text lines.</p>
<p>Here are the final results</p>
<p><img class="size-full wp-image-42 alignnone" title="Untitled-1" src="http://codewithdesign.com/wp-content/uploads/2009/10/Untitled-1.jpg" alt="Untitled-1" width="479" height="261" /></p>
<p>Caleb Jonasson</p>
<img src="http://codewithdesign.com/?ak_action=api_record_view&id=40&type=feed" alt="" /><p>Related posts:<ol>
<li><a href='http://codewithdesign.com/2009/12/27/modifying-next-and-previous-posts/' rel='bookmark' title='Modifying next and previous posts'>Modifying next and previous posts</a></li>
<li><a href='http://codewithdesign.com/2009/12/22/making-it-that-much-better-with-css3/' rel='bookmark' title='Making it that much better with CSS3'>Making it that much better with CSS3</a></li>
<li><a href='http://codewithdesign.com/2010/05/05/remove-images-and-increase-load-times-with-css3/' rel='bookmark' title='Remove images and increase load times with CSS3'>Remove images and increase load times with CSS3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codewithdesign.com/2009/10/04/creating-a-single-page-login-%e2%80%93-design-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

