<?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>Jes.Gs v2.0 &#187; WordPress</title>
	<atom:link href="http://www.jes.gs/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jes.gs</link>
	<description>The Portfolio and Blog of Minneapolis Web Designer Jessica C. Green</description>
	<lastBuildDate>Sat, 21 Jan 2012 19:56:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress: Using page_css_class</title>
		<link>http://www.jes.gs/php/wordpress-page-css-class/</link>
		<comments>http://www.jes.gs/php/wordpress-page-css-class/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 04:30:58 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Recommended]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress Resources]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=575</guid>
		<description><![CDATA[How to use WordPress hooks to change the pagenav class from page-item-# to page-item-pagename.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty sure that I&#8217;m not the only person who is somewhat annoyed by the way WordPress handles the page-item classes for Page lists. Particularly if you&#8217;re like me and you use WordPress as a CMS. It would be a lot easier to deal with <code>page-item-pagename</code> than <code>page-item-1</code>. For one, <code>page-item-pagename</code> is easier to remember. Well, I bet you didn&#8217;t know that you can change that! Yep, that&#8217;s right. You can, and it&#8217;s all because of a relatively unknown hook that was introduced in WordPress 2.8 called <code>page_css_class</code>, and here is very quick and dirty way of changing the page item classes to match the pagename and <em>not</em> the page ID.</p>
<ol>
<li>Open or create a functions.php file in your theme directory.</li>
<li>Then paste the code below into your functions.php file:</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page_css_class'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_page_css_class'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009933; font-style: italic;">/**
 *	custom_page_css_class()
 *	Hooks into page_css_class and modifies the page item class so that
 *	it uses the name of the page instead of the id.
 *
 *	@global int $id.		The ID of the page being viewed. Needed to set current_page_item.
 *	@param array $class.	The page css class being modified, passed as an array from Walker_Page
 *	@param object $page.	The page object passed from Walker_Page
 *	@return array			Returns the new page css class.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> custom_page_css_class<span style="color: #009900;">&#40;</span><span style="color: #000088;">$class</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
		<span style="color: #666666; font-style: italic;">/* checks if the page ID matches the current page and if it does,
		    adds the current_page_item class
		*/</span>
		<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page_item'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page-item-'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_name</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'current_page_item'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page_item'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page-item-'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>There you go! Yes, it&#8217;s that easy.</p>
<p>What the example does is it duplicates what&#8217;s happening in the WordPress source code but instead of using $page->ID, it&#8217;s using $page->post_name. It assembles the classes into an array and then returns it to be echo-ed out when the pagenav is generated. Note that $class isn&#8217;t used but it is necessary to have it as one of the parameters because WordPress passes it to the hook by default and we need the $page object in order to make the example work.</p>
<p>Happy coding!</p>
<ul>
<li><a href="http://adambrown.info/p/wp_hooks/hook/page_css_class" rel="external">WordPress hook directory page_css_class</a></li>
<li><a href="http://svn.automattic.com/wordpress/tags/2.9/wp-includes/classes.php" rel="external">WordPress Classes.php Source Reference</a></li>
<li><a href="http://wordpress.org/support/topic/243523" rel="external">WordPress Support: Add Link with Class to Page Menu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/php/wordpress-page-css-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing ThickBox in WordPress 2.8</title>
		<link>http://www.jes.gs/htmlcss/how-to-fix-thickbox-in-wordpress-2-8/</link>
		<comments>http://www.jes.gs/htmlcss/how-to-fix-thickbox-in-wordpress-2-8/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 20:45:49 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Recommended]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=324</guid>
		<description><![CDATA[How to restore ThickBox functionality in Wordpress 2.8 and higher.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using ThickBox then you&#8217;ve probably noticed that ThickBox is technically broken in WordPress 2.8. After trial-and-error, I&#8217;ve tracked down the problems and this is what&#8217;s happening and here is how to fix it.</p>
<p><ins datetime="2010-02-27T05:35:41+00:00" style="font-size:  medium; text-decoration: none; line-height: 1em; "><em><strong>Edit</strong>: February 27th, 2009. Finally had to time to check but the missing ThickBox CSS is still a problem in WordPress 2.9. My guess is that it might not be an actual bug but a feature to accommodate designers creating their own custom ThickBox designs.</em></ins></p>
<h3>WordPress 2.8 requires themes to have <strong>wp_footer()</strong></h3>
<p>WP 2.8 introduced a new option when using wp_enqueue_script() to load JavaScript files. It allows you the option of having the scripts load in the footer, which is why WordPress themes now require wp_footer() to work properly. However, that wasn&#8217;t my problem since I&#8217;d always added wp_head(), wp_meta() and wp_footer() as a matter of course when designing themes. So if the absence or presence of wp_footer() wasn&#8217;t the problem, then what was really going on?</p>
<h3>What&#8217;s with ThickBox anyway?</h3>
<p>Now, for the problem with ThickBox. So we know that it <em>is</em> being loaded, just in the footer. What I <em>have</em> found is that WordPress is <em>not</em> loading all of the files that ThickBox needs to work. jQuery <em>is</em> being loaded, so that can be ruled out. What <em>isn&#8217;t</em> being loaded is the CSS file that ThickBox needs to format its popup window. Also, another part of the problem is the ThickBox.js file itself has the paths to the images it needs set to relative paths.</p>
<h3>How we fix it</h3>
<p>Starting off, if you haven&#8217;t added the code to load ThickBox, go ahead and add <code>wp_enqueue_script( 'jquery' )</code> and <code>wp_enqueue_script( 'thickbox' )</code> to your header. Now what we do is we add <strong>wp_enqueue_style(&#8216;thickbox&#8217;)</strong> to our &lt;head&gt; section. I&#8217;ve seen people asking for wp_enqueue_css and &#8220;lamenting&#8221; the fact there isn&#8217;t such a function but there actually <em>is</em>, it is <strong><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style">wp_enqueue_style()</a></strong>. The second part requires adding to an existing functions.php file or creating a functions.php if it doesn&#8217;t exist with your current theme. In your functions.php file, copy and paste this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_footer'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'load_tb_fix'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> load_tb_fix<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot;&gt;tb_pathToImage = &quot;'</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-includes/js/thickbox/loadingAnimation.gif&quot;;tb_closeImage = &quot;'</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-includes/js/thickbox/tb-close.png&quot;;&lt;/script&gt;'</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This fixes those first few lines of the ThickBox.js file that calls the images that ThickBox uses, and it is inserted in the footer <em>after</em> the call that inserts the reference to ThickBox.js.</p>
<p>So now, ThickBox functionality should be restored. Quick recap:</p>
<ol>
<li>Add the code below to your &lt;head&gt; section:

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'thickbox'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'thickbox'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</li>
<li>Then add this code to your functions.php file:

<div class="wp_syntax"><table><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>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_footer'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'load_tb_fix'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> load_tb_fix<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot;&gt;tb_pathToImage = &quot;'</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-includes/js/thickbox/loadingAnimation.gif&quot;;tb_closeImage = &quot;'</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-includes/js/thickbox/tb-close.png&quot;;&lt;/script&gt;'</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</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>

</li>
</ol>
<h3>Conclusion</h3>
<p>Had do some research to figure out what was going on besides just looking at my own source code. The first reference to this issue I found was at this link: <em><a href="http://kovshenin.com/archives/thickbox-and-jquery-in-wordpress-2-8/">ThickBox and jQuery in WordPress 2.8</a></em>, then I figured out how to fix the ThickBox dependency image loading issues by looking at the code for the NextGen Gallery plugin.</p>
<p>Good luck! And enjoy your restored ThickBox functionality <img src='http://www.jes.gs/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/htmlcss/how-to-fix-thickbox-in-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Vote for WordPress 2.9 Media Features</title>
		<link>http://www.jes.gs/updates/get-your-2%c2%a2-in-vote-for-wordpress-2-9-media-features/</link>
		<comments>http://www.jes.gs/updates/get-your-2%c2%a2-in-vote-for-wordpress-2-9-media-features/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 22:14:58 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=298</guid>
		<description><![CDATA[Your opinion does matter! Get your 2¢ in on the media features for the next version of WordPress! WordPress › Blog » Vote for 2.9 Media Features. This is a ]]></description>
			<content:encoded><![CDATA[<p>Your opinion <em>does</em> matter! Get your 2¢ in on the media features for the next version of WordPress!</p>
<p><a href="http://wordpress.org/development/2009/07/vote-for-2-9-media-features/">WordPress › Blog » Vote for 2.9 Media Features</a>.</p>
<p>This is a very good idea, in my opinion. WordPress already has fairly strong media managment features but there is more than enough room for improvement. I also think that the idea of Media Albums and Post Thumbnails would be really awesome. It would greatly eliminate the need for complicated hacking, for one. Personally, I hope those two ideas make it into 2.9 as features. A lot of people, including myself, are using WordPress for more than just blogging—for instance, as portfolios—and having a feature like media albums that <em>aren&#8217;t </em>tied to a post or even post thumbnails, would really take out a good portion of production time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/updates/get-your-2%c2%a2-in-vote-for-wordpress-2-9-media-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manga+Press Status</title>
		<link>http://www.jes.gs/general/mangapress-status/</link>
		<comments>http://www.jes.gs/general/mangapress-status/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 20:01:21 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mangapress]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress Resources]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=164</guid>
		<description><![CDATA[Status on Manga+Press release &#8230;]]></description>
			<content:encoded><![CDATA[<p>A little status update on Manga+Press 1.0 RC1. I&#8217;ve been shaking out bugs and reworking some of the code. I hope to have it out for release sometime next week, followed by a &#8220;skeleton&#8221; WordPress theme that works with the plugin. Right now, I&#8217;m testing Manga+Press out using a modified version of the Kubrik theme that comes with WordPress.</p>
<p>I&#8217;m aiming for a Friday release, so check back for more info!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/general/mangapress-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manga+Press Coming!</title>
		<link>http://www.jes.gs/general/mangapress-coming/</link>
		<comments>http://www.jes.gs/general/mangapress-coming/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 20:46:38 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mangapress]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=160</guid>
		<description><![CDATA[New Wordpress plugin for managing comics.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a comic manager plugin since the beginning of this year. After many starts and stops and road-blocks, I&#8217;m happy to announce that in time for 2009, I will be releasing my comic manager plugin for WordPress called <strong>Manga+Press</strong>!</p>
<p>Stay tuned for details!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/general/mangapress-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Calendars II</title>
		<link>http://www.jes.gs/htmlcss/css-calendars-part-two-wordpress-integration/</link>
		<comments>http://www.jes.gs/htmlcss/css-calendars-part-two-wordpress-integration/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 08:28:53 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=110</guid>
		<description><![CDATA[More tips and tricks for CSS calendar icons, but this time, for Wordpress!]]></description>
			<content:encoded><![CDATA[<p>The last tutorial on CSS Calendar Icons was pretty straightforward but lacked directions for integration with other blogging platforms. Here, I&#8217;m going to use WordPress as an example and I&#8217;ll work with my calendar book-style css icon.<br />
<span id="more-110"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">// begin calendar icon code</span>
	<span style="color: #000088;">$year</span> <span style="color: #339933;">=</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$y1</span><span style="color: #339933;">,</span><span style="color: #000088;">$y2</span><span style="color: #339933;">,</span><span style="color: #000088;">$y3</span><span style="color: #339933;">,</span><span style="color: #000088;">$y4</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_split</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$year</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;span class=&quot;cssCalendar book&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'F jS, Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
		&lt;span class=&quot;spine&quot;&gt;&lt;/span&gt;
		&lt;span class=&quot;year&quot;&gt;&lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$y1</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt; &lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$y2</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt; &lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$y3</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;&lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$y4</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt; &lt;/span&gt;
		&lt;span class=&quot;cssCalInner&quot;&gt;
			&lt;span class=&quot;month&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'M'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
			&lt;span class=&quot;date&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'j'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
		&lt;/span&gt;
	&lt;/span&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">// end calendar icon code ?&gt;</span></pre></div></div>

<p>Here, we&#8217;re using the WordPress function <a href="http://codex.wordpress.org/Template_Tags/get_the_time" rel="external wordpress" title="Wordpress Function: get_the_time()"><strong>get_the_time()</strong></a>, which works like <a href="http://codex.wordpress.org/Template_Tags/the_time" rel="external wordpress" title="Wordpress Function: the_time()"><strong>the_time()</strong></a>&#8212;which means that it uses the same <a href="http://us3.php.net/manual/en/function.date.php">PHP Date and Time formatting characters</a> as <strong>the_time()</strong>. Unlike <strong>the_time()</strong>, <strong>get_the_time()</strong> passes the result to a variable instead of echoing it, which is what we need here. We use <strong>get_the_date(&#8216;Y&#8217;)</strong> to grab just the year-part of the date, then we use <a href="http://us3.php.net/manual/en/function.str-split.php" rel="external php" title="Native PHP Function"><strong>str_split()</strong></a> and <a href="http://us3.php.net/manual/en/function.list.php" rel="external php" title="Native PHP Function"><strong>list()</strong></a> to parse the individual numbers of the year into separate variables.<br />
CSS Code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Default Calendar Styles */</span>
span<span style="color: #6666ff;">.cssCalendar</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
span<span style="color: #6666ff;">.cssCalInner</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
span<span style="color: #6666ff;">.cssCalendar</span> <span style="color: #6666ff;">.day</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
span<span style="color: #6666ff;">.cssCalendar</span> <span style="color: #6666ff;">.month</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
span<span style="color: #6666ff;">.cssCalendar</span> <span style="color: #6666ff;">.date</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
span<span style="color: #6666ff;">.cssCalendar</span> <span style="color: #6666ff;">.year</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* Book-Style */</span>
<span style="color: #6666ff;">.book</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">57px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.cssCalInner</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCC</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCC</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.spine</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/calendar_book.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">scroll</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">38px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.year</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">purple</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">38px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.year</span> span <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.month</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.book</span> <span style="color: #6666ff;">.date</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Seems pretty straightforward, right?</p>
<p>Using WordPress? Go to the next page for a WordPress add-on to use in your own WordPress themes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/htmlcss/css-calendars-part-two-wordpress-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New site finished!</title>
		<link>http://www.jes.gs/general/new-site-finished/</link>
		<comments>http://www.jes.gs/general/new-site-finished/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 05:06:34 +0000</pubDate>
		<dc:creator>Jess G.</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dumpster-fairy.com/?p=86</guid>
		<description><![CDATA[New site is finished...and I hurt ;-)]]></description>
			<content:encoded><![CDATA[<p>Well, the new site is finally finished. Lots of changes to the site&#8217;s navigation and function. I added a few more pages, and decided to place new tutorials and resources on the front page. There is a new links page that will have links to other web design/graphic design sites that I come across in my surfing&#8230;come to think of it, I should probably add a link to my delicious account as well!<br />
<span id="more-86"></span>But whatever. I&#8217;m just happy I&#8217;m finally finished. The new site design must have comprised at least 40 hours&#8217; worth of work—judging from the strain on my mouse-hand. The design actually came about as a result of my Writing for Interactive Media class about a few weeks back. The objective was to create a content (or concept) script for any type of interactive media project like a Flash game, web site, interactive math lesson, etc. I decided to redesign my own website. If I work in the time I spent on the navigational flowchart, content script, the wire-frames, the Photoshop template, and <em>then</em> finally translating that template to html and css (no, I didn&#8217;t bother with the export-to-web feature—sometimes, that just creates more headaches), <strong><em>then</em></strong> *sighs* the WordPress/PHP work.</p>
<p>Yeah, 40 hours easily. And my shoulders and hands feel the strain. But hey, I had fun doing this though, and it allowed me an even greater in-depth view of WordPress&#8217;s API.</p>
<p>There are still a few things that need to be finished, like the portfolio, the links page and the contact page but those were things I really couldn&#8217;t do anything about until the site had been uploaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jes.gs/general/new-site-finished/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

