<?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>Propaganda Party &#187; WordPress</title>
	<atom:link href="http://blog.popstalin.com/articles/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.popstalin.com</link>
	<description>The Pop Stalin Design Manifesto</description>
	<lastBuildDate>Sat, 11 Jul 2009 18:51:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress Front Page Login &amp; a Sliding jQuery Panel</title>
		<link>http://blog.popstalin.com/articles/wordpress/wordpress-front-page-login</link>
		<comments>http://blog.popstalin.com/articles/wordpress/wordpress-front-page-login#comments</comments>
		<pubDate>Sat, 11 Jul 2009 18:42:22 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=355</guid>
		<description><![CDATA[Login, register or recover your WordPress password without leaving the page you're on using a sliding jQuery panel and the Ajax Login Widget++. It's super easy with a bit of PHP code and JavaScript. Never have Subscribers see wp-login.php again.]]></description>
			<content:encoded><![CDATA[<p>There are two things that are all the rage in web development at the moment&#8211;WordPress and jQuery. I&#8217;ve got a fairly decent handle on making WordPress do what I want it to but I&#8217;m at a loss when it comes to do with anything javascript related. I can&#8217;t code anything myself, so I&#8217;m one of the many people who set out to find the solution via Google and the talented developers who code nifty things. This is one of those nifty things I borrowed. A recent client wanted a way for Subscribers to his site to be able to log in, register or recover a lost password from the front page. This is the tale of how I accomplished that.<br />
<span id="more-355"></span><br />
When I went searching, I found what I thought was the perfect solution until I tried registering or logging in. Jeeremie over at Web-kreation has a sweet tutorial on implementing a <a href="http://web-kreation.com/index.php/wordpress/implement-a-nice-clean-jquery-sliding-panel-in-wordpress-27/">jQuery sliding panel in WordPress</a>. I followed the tutorial, I copied the code and everything worked like a peach except for that little problem I mentioned earlier. All his beautiful work that allowed me to have the forms in the sliding panel was for naught was you actually wanted to log in or register. Then you were taken away from the page and to dumped onto the regular old wp_login.php page. The breaks squealed and I scratched my head and thought, &#8220;Nope, this isn&#8217;t gonna work.&#8221; I figured there had to be something I could combine with his sliding panel code to make this do what I wanted it to do. That&#8217;s when I came across <a href="http://dound.com/projects/word-press/ajax-login-widget/">AJAX Login Widget++</a> written by David Underhill. Voila, magic! Now, it&#8217;s not the perfect solution because you have to fiddle with a file in the plugin folder but it works for what the client wants and that&#8217;s all that matters. Right? Right! Below is the code that I used to make this work. If you have questions, you can ask and I&#8217;ll do my best to answer but you may be better off going to the sites listed above and getting help from the creators of this goodness.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!-- Panel --&gt;
&lt;div id=&quot;toppanel&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #990000;">global</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_ID</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">// If user is logged in or registered, show dashboard links in panel</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div id=&quot;panel&quot;&gt;
  &lt;div class=&quot;content clearfix&quot;&gt;
    &lt;div class=&quot;left border&quot;&gt;
      &lt;h1&gt;Welcome back <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$user_identity</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
      &lt;h2&gt;My Account&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/index.php&quot;&gt;Go to Dashboard&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;Edit My Profile&lt;/a&gt;&lt;/li&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_1'</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;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/edit-comments.php&quot;&gt;Comments&lt;/a&gt;&lt;/li&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</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>&quot; rel=&quot;nofollow&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Log out'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Log out'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div class=&quot;left narrow&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_10'</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;h2&gt;Appearance&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/themes.php&quot;&gt;Themes&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/widgets.php&quot;&gt;Widgets&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/theme-editor.php&quot;&gt;Theme Editor&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;h2&gt;Plugins&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/plugins.php&quot;&gt;Plugins&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/plugin-install.php&quot;&gt;Install a Plugin&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/plugin-editor.php&quot;&gt;Plugin Editor&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_2'</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;div class=&quot;left narrow&quot;&gt;
      &lt;h2&gt;Posts&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/post-new.php&quot;&gt;New Post&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/edit.php&quot;&gt;Edit Posts&lt;/a&gt;&lt;/li&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_3'</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;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/edit-tags.php&quot;&gt;Tags&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/categories.php&quot;&gt;Categories&lt;/a&gt;&lt;/li&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &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> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_3'</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;h2&gt;Pages&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/post-new.php&quot;&gt;New Page&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/edit-pages.php&quot;&gt;Edit Pages&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_2'</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;div class=&quot;left narrow&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_3'</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;h2&gt;Users&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/users.php&quot;&gt;Author &amp;amp; Users&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/user-new.php&quot;&gt;Add New&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;h2&gt;Library&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/upload.php&quot;&gt;Library&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/media-new.php&quot;&gt;Add New&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_10'</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;div class=&quot;left narrow&quot;&gt;
      &lt;h2&gt;Settings&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-general.php&quot;&gt;General&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-writing.php&quot;&gt;Writing&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-reading.php&quot;&gt;Reading&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-discussion.php&quot;&gt;Discussion&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-media.php&quot;&gt;Media&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-privacy.php&quot;&gt;Privacy&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-permalink.php&quot;&gt;Permalinks&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/options-misc.php&quot;&gt;Miscellaneous&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- /login --&gt;
&lt;!-- The tab on top --&gt;
&lt;div class=&quot;tab&quot;&gt;
  &lt;ul class=&quot;login&quot;&gt;
    &lt;li class=&quot;left&quot;&gt; &lt;/li&gt;
    &lt;!-- Logout --&gt;
    &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</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>&quot; rel=&quot;nofollow&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Log out'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Log out'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;/a&gt;&lt;/li&gt;
    &lt;li class=&quot;sep&quot;&gt;|&lt;/li&gt;
    &lt;li id=&quot;toggle&quot;&gt; &lt;a id=&quot;open&quot; class=&quot;open&quot; href=&quot;#&quot;&gt;Show Dashboard&lt;/a&gt; &lt;a id=&quot;close&quot; style=&quot;display: none;&quot; class=&quot;close&quot; href=&quot;#&quot;&gt;Close Panel&lt;/a&gt; &lt;/li&gt;
    &lt;li class=&quot;right&quot;&gt; &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;!-- / top --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #666666; font-style: italic;">// Else if user is not logged in, show login and register forms</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div id=&quot;panel&quot;&gt;
  &lt;div class=&quot;content clearfix&quot;&gt;
    &lt;div class=&quot;left border&quot;&gt;
      &lt;h1&gt;Put a Salutation Here&lt;/h1&gt;
      &lt;h2&gt;You can put even more stuff here.&lt;/h2&gt;
      &lt;p class=&quot;grey&quot;&gt;You can put anything you want in this sliding panel: videos, audio, images, forms... The only limit is your imagination!&lt;/p&gt;
    &lt;/div&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> add_ajax_login_widget<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;!-- /login --&gt;
  &lt;!-- The tab on top --&gt;
  &lt;div class=&quot;tab&quot;&gt;
    &lt;ul class=&quot;login&quot;&gt;
      &lt;li class=&quot;left&quot;&gt;&amp;nbsp;&lt;/li&gt;
      &lt;!-- Login / Register --&gt;
      &lt;li id=&quot;toggle&quot;&gt; &lt;a id=&quot;open&quot; class=&quot;open&quot; href=&quot;#&quot;&gt;Log In | Register&lt;/a&gt; &lt;a id=&quot;close&quot; style=&quot;display: none;&quot; class=&quot;close&quot; href=&quot;#&quot;&gt;Close Panel&lt;/a&gt; &lt;/li&gt;
      &lt;li class=&quot;right&quot;&gt;&amp;nbsp;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;!-- / top --&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&lt;!--END panel --&gt;</pre></td></tr></table></div>

<p>The nice thing about the way Jeeremie coded this, your WordPress Dashboard links are available to you by levels. For example, if you&#8217;re an Administrator of the site, then you will see all the links available that you would in the Dashboard. He separates them with some spiffy PHP based on user levels. </p>
<p>The code for the Ajax Login Widget++ is on line 119. </p>
<p>One more neat thing that another user, <a href="http://web-kreation.com/index.php/wordpress/implement-a-nice-clean-jquery-sliding-panel-in-wordpress-27/#comment-5541">Jonathan</a>, over at Web-kreation came up with is only showing the sliding panel to the admin. Here&#8217;s the code for that:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</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> current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'level_10'</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;!-- Panel --&gt;
&lt;div id=&quot;toppanel&quot;&gt;
... ALL THE CODE FROM ABOVE GOES HERE...
&lt;/div&gt;&lt;!--END panel --&gt;
<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>Of course, if you&#8217;re going to show the sliding panel only to the Admin, then you won&#8217;t need all the user level codes in the original code. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/wordpress-front-page-login/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a WordPress Magazine-esque Theme: Part II</title>
		<link>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2</link>
		<comments>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2#comments</comments>
		<pubDate>Mon, 20 Apr 2009 12:00:44 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=224</guid>
		<description><![CDATA[Second part in a three part series of how I created the theme for my blog using a magazine-esque layout and WordPress custom loops and queries.]]></description>
			<content:encoded><![CDATA[<h2>Single.php and Category pages</h2>
<p><a href="http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1">In part 1</a>, I covered the code necessary to provide my home page functionality. In this segment, I&#8217;ll cover how I created the functionality for the single.php page and the category pages. The code for the single.php page closely mirrors the code for the index.php page with the addition of the comment code. Again, the process for creating these pages closely followed that of the index page&#8211;I created a prototype sketch, I fleshed it out in Photoshop and then I opened my text editor and started coding. <span id="more-224"></span></p>
<p>First, I wanted the single page to have roughly the same appearance as the index.php minus the additional posts below the &#8220;featured&#8221; post. I wanted the image to carry over into the post and I wanted the text to be the main emphasis on the page because that&#8217;s what a blog is all about in my opinion. I&#8217;ve seen lots of designs I like that had asides to the left or right of the post but in this incarnation, I wanted the reader to focus solely on the text of the post when clicking through. </p>
<h2>1. Single.php Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><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: #000000; font-weight: bold;">&lt;?php</span> get_header<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>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<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>
// THIS IS WHERE MY META AND OTHER POST CONTENT GOES
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
// THIS IS WHERE I PUT SOME SORT OF MESSAGE TELLING THE READER THEY'VE NOT FOUND WHAT THEY'RE LOOKING FOR
<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>
// SOME MORE OF MY OWN CSS LAYOUT CODE
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_template<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>
// I CLOSE UP ALL MY OPEN DIV'S
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<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></pre></td></tr></table></div>

<p>As you can see, there are no custom loops or queries. The only &#8220;custom&#8221; code on this page is my CSS and the code I need to bring in the image from the custom field, which was covered in part 1. The real &#8220;exciting&#8221; stuff, actually takes place within the category pages so I&#8217;ll go over that in more detail next. </p>
<h2>2. Category Pages and the Template Hierarchy</h2>
<p>When visiting the WordPress Codex, I&#8217;ve often see the phrase &#8220;<strong>Template Hierarchy</strong>&#8221; but until this design, I&#8217;d never really read about it. What I learned was that if I wanted a different look or custom loops, I could use the hierarchy. The <strong>Template Hierarchy</strong> works like this; let&#8217;s say I have 5 categories and I want them each to have their own page. I can achieve this by creating a category page for each separate category and WordPress will look for a specific page for the category if I name the file the following way: <strong>category-5.php</strong>. The number in the file name is the actual number of the category so when a visitor clicks on, for example, <strong>Design</strong> and <strong>Design</strong> is <strong>category 5</strong> in the database, WordPress will serve that page using <strong>category-5.php</strong> instead of just <strong>category.php</strong> or <strong>archives.php</strong>. It&#8217;s a simple way to create unique pages per category without the hassle of really having to creating template files. </p>
<h2>3. Custom Loop for Category Pages</h2>
<p>The first thing you&#8217;ll see on each category page is the heading for that page. For example, in the business category, you&#8217;ll see &#8220;<strong>Business Articles</strong>.&#8221; That is handled dynamically by using the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> single_cat_title<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> Articles&lt;/h2&gt;</pre></div></div>

<p>The PHP tells the database to spit out the category name or title. </p>
<p>The next thing you&#8217;ll see is the posts with excerpts. This is handled using a custom WordPress Query.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</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: #000088;">$temp</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span><span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'showposts=16&amp;cat=3,9'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;paged='</span><span style="color: #339933;">.</span><span style="color: #000088;">$paged</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;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><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></pre></td></tr></table></div>

<p>A very important part of this custom query is telling WordPress that this page will be&#8230;paged; meaning there is more than one page. In order to use a custom query, you must use that bit of PHP code or else your paging, whether you use a plugin or the built-in navigation of older or newer entries, won&#8217;t work. </p>
<p>The next important part of this query is indicating how many posts per page should be displayed and what categories to display. Since I have sub-categories set-up under the main categories, I want to make sure those show up as well.</p>
<h2>Styling My Category Pages</h2>
<p>An important part of the next piece of custom code was styling the most recent post differently (do you notice a trend?). I wanted that post to stand out from all the others for two reasons. It gives the reader a point of reference as to what&#8217;s important on the page and it helps break up the design a little. </p>
<p>I decided when planning my redesign that I didn&#8217;t want the typical archives. I wanted to display past articles in a different way starting with making the most recent article be prominent on the category page. I did this with a simple bit of code that I discovered through the <a href="http://wordpress.org/support/topic/212494">WordPress forums with the help of pshero</a>.  He too was looking for a way to style the most recent post differently than the rest and came up with the PHP code that would do the trick. Here is what I used to make the most recent post stand out on the category page.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>8
9
10
11
12
</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>is_paged<span style="color: #009900;">&#40;</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: #000088;">$postclass</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'archivelist'</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;">else</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: #000088;">$postclass</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$posts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'archivelist-featured'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'archivelist'</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>Then the above is applied to your div class the following way:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$postclass</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></td></tr></table></div>

<p>Basically, what this piece of code does is create a way to assign two classes to the posts on the page dynamically. If it&#8217;s the most recent post, then it is assigend &#8220;archivelist-featured&#8221; and any subsequent post is then tagged with &#8220;archivelist.&#8221; If you click on the link above, it will take you to the thread and explain in more detail different usage. </p>
<h2>4. Crossing the Finish Line</h2>
<p>After I make things pretty, we need to add some of the basic WordPress code to show the date, post title and the excerpt.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>14
15
16
17
18
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;h3 class=&quot;meta&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_date<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m-d-y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &amp;#8249;&amp;#8250; <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
  &lt;h3&gt;&lt;a href=&quot;<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;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<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;/a&gt;&lt;/h3&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</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 ARCHIVE LIST --&gt;    
   <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>We&#8217;re getting there. The last thing you may notice on the page, other than the footer, is the paged navigation. In order for that to work properly, you have to code it the following way:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;navigation&quot;&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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_pagenavi'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> wp_pagenavi<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>  
&lt;/div&gt;&lt;!-- // END NAVIGATION --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #339933;">;</span> <span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>You&#8217;ll notice that we close the custom WordPress query <strong><em>after</em></strong> we call for the paged navigation. If you don&#8217;t do that, you&#8217;ll have your pagination showing up on every page, most likely not showing a correct page count.</p>
<h2>The End is Nigh</h2>
<p>In this post I covered using PHP to dynamically pass CSS classes to differentiate posts, I covered template hierarchy and its purpose and I covered paging and custom queries. I hope this is useful to folks and expanding on your WordPress coding foundation.</p>
<p>In part three, a much shorter article by far, I&#8217;ll cover what plug-in&#8217;s I&#8217;m using and why and the benefits of automated content.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a WordPress Magazine-esque Theme: Part I</title>
		<link>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1</link>
		<comments>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1#comments</comments>
		<pubDate>Wed, 15 Apr 2009 10:00:11 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=222</guid>
		<description><![CDATA[First part in a three part series of how I created the theme for my blog using a magazine-esque layout and WordPress custom loops and queries.]]></description>
			<content:encoded><![CDATA[<h2>The Creation of Manifesto &#8216;09</h2>
<p>When I thought about the redesign of my blog, I wanted something that had a magazine feel to it but not the full functionality of a magazine theme. I didn’t need to display sections for different categories because I still wanted to run a blog and not a magazine&#8211;though in the future I could see myself actually adding that sort of functionality and turn my blog into a magazine. <span id="more-222"></span></p>
<p>I looked at all the available magazine layout themes, both paid and free, to get a feel for what it is that I like about them. The recurring theme that I liked about magazine layouts is the grid system. So I put pencil to paper and began sketching box after box attempting to get a simple grid layout that would satisfy my desire to have a magazine-esque layout. After a prototype or ten I had my creative juices flowing pretty well. I fired up Photoshop and played with color and layout until I came close to the design you see now. Just a side note, when it comes to my own sites, I often deviate from my Photoshop concepts after I start coding. For example, in my design concept, my footer was part of the five regular posts (limiting my posts to 4 on the front page). After playing about a bit with widths and other CSS styles, I decided to actually create a footer and use that space for additional posts.</p>
<p>After getting a close approximation of what I wanted it to look like, I started to think about how it would function. I wasn&#8217;t wild about the idea of having to create a &#8220;featured&#8221; category just to have a featured post. If I had a featured category, did I want to link to it and if I didn’t, what was the point of having a featured category to begin with. After deciding that a featured category was not an option, I looked for plugin’s but I didn&#8217;t want to use theme to achieve that option either. I decided not to allow my limited PHP knowledge hold me back from what I knew WordPress can do.</p>
<p>I set about researching my options and custom loops, finally figuring out a way to mix CSS and PHP to get what I wanted on the front page. I know there are probably ways that accomplish this with less code or more complex functions but I’m working within my abilities of PHP coding and learning as I go. </p>
<p>Without further ado, here’s how I accomplished my front page layout.</p>
<h2>1. Featured Post Custom Loop Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<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>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$featured</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_per_page=1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$featured</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><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>
// THIS IS WHERE MY META AND OTHER POST CONTENT GOES
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The third line of code starts the loop. It tells WordPress that there&#8217;s a new database query about to happen. The fourth line of code tells the database to give us one post and the most recent one at that. The fifth line tells the database that the loop begins now if there is a post. The area of greatest interest for my needs is <strong>posts_per_page</strong>. Since my newest post was going to be &#8220;featured&#8221; I only wanted to show one and stop. Once I had that working, I went on the implement the second custom loop to display the additional posts on the front page.</p>
<h2>2. Regular Posts Custom Loop Code</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>9
10
11
12
13
14
15
</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: #000088;">$asides</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_per_page=5&amp;offset=1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$asides</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><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>
// THIS IS WHERE I PUT MY CODE FOR THE ADDITIONAL POST TITLES AND EXCERPTS
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>On line #11 I have similar code as the original query but I go a bit further in telling the database what I&#8217;m looking for. I want to display 5 posts now but I don&#8217;t want to show the &#8220;featured&#8221; or first post, so I tell the database to retrieve 5 posts but to ignore the first or newest one, which is what <strong>offset=1</strong> does. If I were displaying 3 featured posts, I would set the offset at <strong>offset=3</strong>.</p>
<p>Another bit of custom coding I did was to use <strong>custom fields</strong> to display an image in my featured post. The nice part of this code, is that if I don&#8217;t want to attach an image to the post, I don&#8217;t end up getting any errors because of a missing image. First, I went into the <strong>Add New Post</strong> screen and created a <strong>custom field</strong> called <strong>featuredImage</strong>. Then I put the following code in my index.php and category.php templates.</p>
<h2>3. Custom Fields for Featured Images</h2>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</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: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;featuredImage&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;featured-img&quot;&gt;
&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;featuredImage&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<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> Image&quot; /&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The second line of code is the variable that the third line of code works with to see if there is a value to display. If the value isn&#8217;t null, then my div class gets printed. If the value is null, then nothing gets printed at all, i.e., if you look at the source code, there is no image because I didn&#8217;t specify one in my post.</p>
<h2>Wrapping Up Part 1</h2>
<p>If you&#8217;re reading this article, you know the power of WordPress and are probably trying to harness that power to customize your site. What I&#8217;ve posted is how I handled having a &#8220;featured&#8221; post and not having to have a &#8220;featured&#8221; category in order to have a different style for my first post. I hope this post helps some folks because I wasn&#8217;t able to find a tutorial (or code) that showed how to accomplish this. </p>
<p>In the <a href="http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-2">next part</a> of this three part series, I&#8217;ll talk about how I accomplished the layout of my category pages&#8211;and in my case my archives as well, since they serve the same purpose. After coding my index.php page, I discovered another way that is much cleaner code to achieve having the first post having a different look than the rest. I used that method on the category pages so stay tuned to part two to learn how to use a custom loop and PHP to call specific CSS for your first post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/manifesto-09-wordpress-theme-part-1/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Custom Fields for Post Images</title>
		<link>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images</link>
		<comments>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:50:31 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/using-custom-fields-for-post-images/</guid>
		<description><![CDATA[<p>Sometimes a site may want a &#8220;featured&#8221; section with some text and an image. If you&#8217;re using <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a> to achieve this, you may want a way to keep an empty value to display. Meaning, sometimes you don&#8217;t always add the image but if in the&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes a site may want a &#8220;featured&#8221; section with some text and an image. If you&#8217;re using <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a> to achieve this, you may want a way to keep an empty value to display. Meaning, sometimes you don&#8217;t always add the image but if in the template you have the code to automatically pull in the image custom field, then you&#8217;ll either get alt text in place of the image or a big red &#8216;x&#8217;. Here&#8217;s a small snippet of code that will return nothing if nothing is there.</p>
<p>Just place the following code where you would normally place your custom field code:</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span> php
<span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Your-Custom-Field-Value&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-content/uploads/&gt;?php $values = get_post_custom_values(&quot;Your-Custom-Field-Value&quot;); echo $values[0]; ?&gt;&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<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>&quot; /&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?</span> php <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>If you write a post that doesn&#8217;t have an image, you won&#8217;t get any of those pesky errors. Thanks goes to authors on the WordPress forums for their efforts in helping folks who aren&#8217;t as well-versed in PHP coding as we&#8217;d like to be. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/using-custom-fields-for-post-images/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6, PNGs and WordPress&#8211;It&#8217;s a Party!</title>
		<link>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party</link>
		<comments>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:00:19 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/ie6-pngs-and-wordpress-its-a-party/</guid>
		<description><![CDATA[I am all about the current movement to stop designing for IE6 but being the cautious woman that I am, I'm gonna wait for the numbers to go down just a bit more. I've tried a couple of the plugin's I've found for PNG transparency and still found myself looking at gray boxes in IE6. *Shakes fist in anger at IE6*]]></description>
			<content:encoded><![CDATA[<p>I am all about the current movement to stop designing for IE6 but being the cautious woman that I am, I&#8217;m gonna wait for the numbers to go down just a bit more. I&#8217;ve tried a couple of the plugin&#8217;s I&#8217;ve found for PNG transparency and still found myself looking at gray boxes in IE6. *Shakes fist in anger at IE6*</p>
<p>Then I came across this <a href="http://blog.nkadesign.com/2006/wordpress-fixing-png-transparency-issues-in-ie/">very old post</a> and it seems to have solved my woes and the gray boxes are now a thing of the past (finger&#8217;s crossed). Here&#8217;s the technique:</p>
<p>In your WordPress theme folder&#8211;wp-content/themes/&#8211;upload the following two files (from the link above)&#8211;blank.gif and pngbehavior.htc </p>
<p>Then add the following code to your stylesheet:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Fix for PNG alpha channel display in IE6 */</span>
img <span style="color: #00AA00;">&#123;</span>
 behavior<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;/wp-content/themes/pngbehavior.htc&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/ie6-pngs-and-wordpress-its-a-party/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress PNG Fix Plugin</title>
		<link>http://blog.popstalin.com/articles/wordpress/wordpress-png-fix-plugin</link>
		<comments>http://blog.popstalin.com/articles/wordpress/wordpress-png-fix-plugin#comments</comments>
		<pubDate>Sat, 16 Aug 2008 15:43:13 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/wordpress-png-fix-plugin/</guid>
		<description><![CDATA[<p>I&#8217;m sure I&#8217;m late off the block on this but since I have the tendency to use WordPress quite a bit in my development of sites these days, I wanted a simple solution for the IE6 PNG issue and I found one. It&#8217;s from Unit&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure I&#8217;m late off the block on this but since I have the tendency to use WordPress quite a bit in my development of sites these days, I wanted a simple solution for the IE6 PNG issue and I found one. It&#8217;s from Unit Interactive and all you have to do is install the plugin and activate and not worry about a thing. I like that type of solution—quick and easy.</p>
<p><a href="http://labs.unitinteractive.com/unitpngfix.php">Download the plugin here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/wordpress-png-fix-plugin/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Specifying Unique Titles in WordPress With PHP</title>
		<link>http://blog.popstalin.com/articles/wordpress/specifying-unique-titles-in-wordpress-with-php</link>
		<comments>http://blog.popstalin.com/articles/wordpress/specifying-unique-titles-in-wordpress-with-php#comments</comments>
		<pubDate>Sat, 19 Jan 2008 20:29:32 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/specifying-unique-titles-with-php/</guid>
		<description><![CDATA[<p>I&#8217;ve searched long and hard trying to find a way to add the page name to the title tag dynamically to my WordPress blog page when I&#8217;m using WordPress as a CMS. I finally found the solution that I was able to understand at &#8216;<a href="http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks/">Web&#8230;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve searched long and hard trying to find a way to add the page name to the title tag dynamically to my WordPress blog page when I&#8217;m using WordPress as a CMS. I finally found the solution that I was able to understand at &#8216;<a href="http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks/">Web Designer Wall</a>.&#8217; I changed his code a bit to suit my own needs and thought I&#8217;d paste the code here for anyone who may need it (and as a repository for me for future use). </p>
<p>The following PHP code should be placed between your title tags in the header.php file.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><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;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'News - Pop Stalin Design: Web Design With Standards'</span><span style="color: #339933;">;</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'404 Not Found'</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #0000ff;">' - '</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'Categories - '</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #0000ff;">' - '</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'Search Results'</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #0000ff;">' - '</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_day<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_month<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_year<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'Archives - '</span><span style="color: #339933;">;</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #0000ff;">' - '</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This code seems overly verbose to me but until I can figure out something more concise, this is what I&#8217;ll be using. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/specifying-unique-titles-in-wordpress-with-php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using WordPress MU as a Development Environment</title>
		<link>http://blog.popstalin.com/articles/wordpress/using-wordpress-mu-as-a-development-environment</link>
		<comments>http://blog.popstalin.com/articles/wordpress/using-wordpress-mu-as-a-development-environment#comments</comments>
		<pubDate>Wed, 16 Jan 2008 14:00:34 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/using-wordpress-mu-as-a-development-environment/</guid>
		<description><![CDATA[<p>A mailing list I subscribe to, <a href="http://womendesignersgroup.com/">Women Designer&#8217;s Group</a>, one of the women briefly spoke about using WordPress MU for client development. The MU stands for &#8216;Multi-User&#8217; and so it struck me as a brilliant idea. I&#8217;m thinking about implementing it in the near future&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>A mailing list I subscribe to, <a href="http://womendesignersgroup.com/">Women Designer&#8217;s Group</a>, one of the women briefly spoke about using WordPress MU for client development. The MU stands for &#8216;Multi-User&#8217; and so it struck me as a brilliant idea. I&#8217;m thinking about implementing it in the near future since I do so much WordPress theme development work. Hell, it&#8217;s what Wordpress.com is powered with.</p>
<h2>WordPress MU Features</h2>
<ul>
<li>Everything WordPress does</li>
<li>Scaling to tens of millions of pageviews per day.</li>
<li>Unlimited users and blogs.</li>
<li>Different permissions on different blogs.</li>
</ul>
<p>What do you think? Pros, cons; is this a viable solution? I&#8217;m not super familiar with the admin side of MU, although I <em>do</em> know that it&#8217;s basically WordPress with MU wrapped around it for administration.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/using-wordpress-mu-as-a-development-environment/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Unique Category Templates in WordPress</title>
		<link>http://blog.popstalin.com/articles/wordpress/unique-category-templates-in-wordpress</link>
		<comments>http://blog.popstalin.com/articles/wordpress/unique-category-templates-in-wordpress#comments</comments>
		<pubDate>Mon, 14 Jan 2008 14:00:38 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/unique-category-templates-in-wordpress/</guid>
		<description><![CDATA[In WordPress sometimes you want a different look for different categories. It's fairly easy to accomplish with a little coding and creating custom <a href="http://codex.wordpress.org/Pages#Page_Templates">page templates</a>. ]]></description>
			<content:encoded><![CDATA[<p>In WordPress sometimes you want a different look for different categories. It&#8217;s fairly easy to accomplish with a little coding and creating custom <a href="http://codex.wordpress.org/Pages#Page_Templates">page templates</a>. </p>
<h2>Code for Page Template File</h2>
<p>The only necessity for using a Page Template is the below code. Just place it at the top of the page template you are creating. A good point of reference to see how a Page Template is handled is by looking at the file &#8216;archives.php&#8217; in your theme. It&#8217;s usually the second &#8216;Archives&#8217; link in the theme editor for the default WordPress theme.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #666666; font-style: italic;">/*
Template Name: Custom Category
*/</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h2>Code to Call Unique Templates</h2>
<p>The below code should be placed at the top of &#8216;category.php&#8217;.</p>

<div class="wp_syntax"><table summary="Highlighted Code"><tr><td class="line_numbers"><pre>6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-</span> <span style="color: #339933;">&gt;</span>post<span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> in_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'3'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/cat3.php’);
} elseif ( in_category('</span><span style="color: #cc66cc;">4</span><span style="color: #0000ff;">') ) {
	include(TEMPLATEPATH . '</span><span style="color: #339933;">/</span>cat4<span style="color: #339933;">.</span>php<span style="color: #0000ff;">');
} else {
	include(TEMPLATEPATH . '</span><span style="color: #339933;">/</span>cat<span style="color: #339933;">.</span>php<span style="color: #0000ff;">');
} ? &gt;</span></pre></td></tr></table></div>

<p>As always you can find out more about <a href="http://codex.wordpress.org/Using_Themes">creating themes</a> and <a href="http://codex.wordpress.org/Template_Tags">template tags</a> at the <a href="http://codex.wordpress.org/Main_Page">WordPress codex</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/unique-category-templates-in-wordpress/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ZDNet in Praise of Wordpress</title>
		<link>http://blog.popstalin.com/articles/wordpress/zdnet-in-praise-of-wordpress</link>
		<comments>http://blog.popstalin.com/articles/wordpress/zdnet-in-praise-of-wordpress#comments</comments>
		<pubDate>Wed, 02 Jan 2008 14:26:08 +0000</pubDate>
		<dc:creator>Jen</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.popstalin.com/?p=124</guid>
		<description><![CDATA[<p>Yes, I&#8217;m obviously infatuated with Wordpress right now. What can I say I&#8217;m definitely smitten. Anyway, there&#8217;s an interesting discussion that took place last month over at ZDNet entitled &#8220;<a href="http://blogs.zdnet.com/BTL/?p=7366">WordPress vs. an army of clunky content management systems</a>.&#8221; Basically the author ponders why so many&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Yes, I&#8217;m obviously infatuated with Wordpress right now. What can I say I&#8217;m definitely smitten. Anyway, there&#8217;s an interesting discussion that took place last month over at ZDNet entitled &#8220;<a href="http://blogs.zdnet.com/BTL/?p=7366">WordPress vs. an army of clunky content management systems</a>.&#8221; Basically the author ponders why so many companies roll out custom CMS software when Wordpress and other open source options are available and, in my and the author&#8217;s opinion, probably better written than in-house CMS&#8217;s.</p>
<blockquote><p>At ZDNet we use WordPress for blogs, but in previous positions I’ve almost always had some custom built creation that usually stinks. Sure, these CMS systems may have started out as standard, but sooner or later they turn into this Frankenstein creation. And lookout below if the guy that cooked up the code ever leaves. If there’s an open source option that has rich features why would you spend time building the same thing?</p></blockquote>
<p>Of course I have an opinion on why so many in-house developers are against using open source software. I think part of the reason is that the developers may not be too familiar with PHP. Most of these folks are Microsoft certified so most of the stuff is going to be written in ASP&#8230; to date you don&#8217;t see a lot of open source ASP software out there on the net. I actually had one Microsoft certified developer tell me PHP would be dead within a year—that was 2-3 years ago now and he was fired before the year was up anyway.</p>
<p>I think it also comes from a fear of losing one&#8217;s worth in the marketplace. If a company has all these highly-paid Microsoft certified developers on staff and suddenly you bring in open source, why do you need them? I think open source software is a perfect compliment for small to medium sized businesses and particularly non-profits. Instead of spending large chunks of money for people to reinvent the wheel, they could go with available solutions that wouldn&#8217;t cost them a dime.</p>
<p>But of course, not everyone is web or business savvy and may not know there are options available to them in the first place. Which is why as web designer&#8217;s we must go forth and plant the open source seed. Now I&#8217;m sounding like Johnny &#8216;Web Designer&#8217; Appleseed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.popstalin.com/articles/wordpress/zdnet-in-praise-of-wordpress/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
