<?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>Jaypwhy</title>
	<atom:link href="http://jaypwhy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaypwhy.com</link>
	<description>Thats why</description>
	<lastBuildDate>Wed, 04 Jan 2012 17:53:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Add Categories and Tags to WordPress pages</title>
		<link>http://jaypwhy.com/2011/08/16/how-to-add-categories-and-tags-to-wordpress-pages/</link>
		<comments>http://jaypwhy.com/2011/08/16/how-to-add-categories-and-tags-to-wordpress-pages/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 23:07:38 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://jaypwhy.com/?p=1242</guid>
		<description><![CDATA[Categories and Tags are not by default supported in WordPress themes, but if you want to support Categories and Tags in your WordPress theme, open up your functions.php file. You can add categories and tags to your pages by using the add_meta_box() function. In your functions.php file, insert: function add_category_box_on_page(){ //add meta box add_meta_box(&#8216;categorydiv&#8217;, __(&#8216;Categories&#8217;), [...]]]></description>
			<content:encoded><![CDATA[<p>Categories and Tags are not by default supported in WordPress themes, but if you want to support Categories and Tags in your WordPress theme, open up your <strong>functions.php</strong> file.</p>
<p>You can add categories and tags to your pages by using the <strong>add_meta_box()</strong> function. In your <strong>functions.php</strong> file, insert:</p>
<blockquote style="background-color: #ffffff;"><p>function add_category_box_on_page(){<br />
//add meta box<br />
add_meta_box(&#8216;categorydiv&#8217;, __(&#8216;Categories&#8217;), &#8216;post_categories_meta_box&#8217;, &#8216;page&#8217;, &#8216;side&#8217;, &#8216;low&#8217;);<br />
add_meta_box(&#8216;tagsdiv-post_tag&#8217;, __(&#8216;Page Tags&#8217;), &#8216;post_tags_meta_box&#8217;, &#8216;page&#8217;, &#8216;side&#8217;, &#8216;low&#8217;);<br />
add_action(&#8216;save_post&#8217;, &#8216;page_cats_tags_save_postdata&#8217;);<br />
}</p></blockquote>
<p>This function adds both category and tags by using the same names (such as &#8216;<strong>tagsdiv-post_tag</strong>&#8216; and &#8216;<strong>categorydiv</strong>&#8216; ) that other WordPress functions use to make sure that the metaboxes that were created with the <strong>add_category_box_on_page()</strong> function that we created above. The &#8216;<strong>post_categories_meta_box</strong>&#8216; and &#8216;<strong>post_tags_meta_box</strong>&#8216; are used to render the meta boxes because they are native wordpress functions.</p>
<p>After inserting the <strong>add_category_box_on_page()</strong> function, insert:</p>
<blockquote style="background-color: #fff;"><p>add_action(&#8216;admin_menu&#8217;, &#8216;add_category_box_on_page&#8217;);</p></blockquote>
<p>This inserts the Category and Tag boxes onto the Page Editor. Next, add:</p>
<blockquote style="background-color: #ffffff;"><p>function page_cats_tags_save_postdata( $post_id ) {</p>
<p>$wpnj_post_type = $_POST['post_type'];</p>
<p>if ( defined(&#8216;DOING_AUTOSAVE&#8217;) &amp;&amp; DOING_AUTOSAVE ){</p>
<p>}else{<br />
// Check permissions<br />
if ( &#8216;page&#8217; == $wpnj_post_type ) {<br />
if ( current_user_can( &#8216;edit_page&#8217;, $post_id ) ){</p>
<p>$wpnj_post_cats = array();</p>
<p>foreach($_REQUEST['post_category'] as $key=&gt;$val){<br />
$wpnj_post_cats[] = $val;<br />
}<br />
wp_set_post_categories( $post_id, $wpnj_post_cats );<br />
}<br />
}<br />
}<br />
}</p></blockquote>
<p>The <strong>page_cats_tags_save_postdata( )</strong> function saves the categories and tags selected with the<strong> $post_id.</strong><br />
Here is the entire code to insert into your <strong>functions.php</strong> to get categories and tags on your pages:</p>
<blockquote style="background-color: #ffffff;"><p>function add_category_box_on_page(){<br />
//add meta box<br />
add_meta_box(&#8216;categorydiv&#8217;, __(&#8216;Categories&#8217;), &#8216;post_categories_meta_box&#8217;, &#8216;page&#8217;, &#8216;side&#8217;, &#8216;low&#8217;);<br />
add_meta_box(&#8216;tagsdiv-post_tag&#8217;, __(&#8216;Page Tags&#8217;), &#8216;post_tags_meta_box&#8217;, &#8216;page&#8217;, &#8216;side&#8217;, &#8216;low&#8217;);<br />
add_action(&#8216;save_post&#8217;, &#8216;page_cats_tags_save_postdata&#8217;);<br />
}</p>
<p>add_action(&#8216;admin_menu&#8217;, &#8216;add_category_box_on_page&#8217;);<br />
function page_cats_tags_save_postdata( $post_id ) {</p>
<p>$wpnj_post_type = $_POST['post_type'];</p>
<p>if ( defined(&#8216;DOING_AUTOSAVE&#8217;) &amp;&amp; DOING_AUTOSAVE ){</p>
<p>}else{<br />
// Check permissions<br />
if ( &#8216;page&#8217; == $wpnj_post_type ) {<br />
if ( current_user_can( &#8216;edit_page&#8217;, $post_id ) ){</p>
<p>$wpnj_post_cats = array();</p>
<p>foreach($_REQUEST['post_category'] as $key=&gt;$val){<br />
$wpnj_post_cats[] = $val;<br />
}<br />
wp_set_post_categories( $post_id, $wpnj_post_cats );<br />
}<br />
}<br />
}<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2011/08/16/how-to-add-categories-and-tags-to-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get an Excerpt and Thumbnail from Child pages</title>
		<link>http://jaypwhy.com/2011/08/16/how-to-get-an-excerpt-and-thumbnail-from-child-pages/</link>
		<comments>http://jaypwhy.com/2011/08/16/how-to-get-an-excerpt-and-thumbnail-from-child-pages/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 22:21:26 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[codex]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 3.0]]></category>

		<guid isPermaLink="false">http://jaypwhy.com/?p=1237</guid>
		<description><![CDATA[If you are looking to create a listing of childpages with excerpts and thumbnails (permalinks too!), look no further! First step is to make sure that the page actually has children. You can do this by using: &#60;?php $children = get_pages(&#8216;child_of=&#8217;.$post-&#62;ID); if( count( $children ) != 0 ) { ?&#62; Page has children &#60;?php } [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jaypwhy.com/wp-content/uploads/2011/08/asd.png"><img class="aligncenter size-full wp-image-1238" title="asd" src="http://jaypwhy.com/wp-content/uploads/2011/08/asd.png" alt="" width="770" height="215" /></a></p>
<p>If you are looking to create a listing of childpages with excerpts and thumbnails (permalinks too!), look no further!</p>
<p>First step is to make sure that the page actually has children. You can do this by using:</p>
<blockquote style="background-color:#fff;"><p>&lt;?php $children = get_pages(&#8216;child_of=&#8217;.$post-&gt;ID); if( count( $children ) != 0 ) { ?&gt;<br />
Page has children<br />
&lt;?php } else { ?&gt;<br />
Page does not have children<br />
&lt;?php }; ?&gt;</p></blockquote>
<p>This would display &#8220;Page has Children&#8221; if the wordpress page had children, otherwise it would display &#8220;Page does not have children&#8221;.</p>
<p>Next, we need to set up arguments for getting the pages by using the post type, get the post parents id, and the number of posts. we then use the get_posts() function with the argument that we have created ($args) and we loop through each of the pages that can pass the is a child of the parent, using the $subpages variable that contains each page (or post).</p>
<blockquote style="background-color:#fff;"><p>&lt;?php $children = get_pages(&#8216;child_of=&#8217;.$post-&gt;ID);<br />
if( count( $children ) != 0 ) { ?&gt;<br />
<strong> &lt;?php</strong><br />
<strong>     // Set up the arguments for retrieving the pages</strong><br />
<strong>     $args = array(</strong><br />
<strong>         &#8216;post_type&#8217; =&gt; &#8216;page&#8217;,</strong><br />
<strong>          &#8216;numberposts&#8217; =&gt; 2,</strong><br />
<strong>          // $post-&gt;ID will get the ID of the current page</strong><br />
<strong>          &#8216;post_parent&#8217; =&gt; $post-&gt;ID,</strong><br />
<strong>          &#8216;order&#8217; =&gt; ASC,</strong><br />
<strong>          &#8216;orderby&#8217; =&gt; title</strong><br />
<strong>     );</strong><br />
<strong> $subpages = get_posts($args);</strong><br />
// WordPress Loop<br />
<strong>  foreach($subpages as $post) : setup_postdata($post);</strong><br />
<strong>?&gt;</strong></p>
<p>Items to be looped would go here<br />
<strong></strong></p>
<p><strong>&lt;?php endforeach; ?&gt;</strong><br />
&lt;?php } else { ?&gt;<br />
Page does not have children</p>
<p>&lt;?php }; ?&gt;</p></blockquote>
<p>Next we grab the data that we want to be displayed with, using the the_title(), the_permalink(), the_post_thumbnail() and the_excerpt functions that are built into WordPress.</p>
<blockquote style="background-color:#fff;"><p>&lt;?php $children = get_pages(&#8216;child_of=&#8217;.$post-&gt;ID);<br />
if( count( $children ) != 0 ) { ?&gt;<br />
&lt;?php<br />
// Set up the arguments for retrieving the pages<br />
$args = array(<br />
&#8216;post_type&#8217; =&gt; &#8216;page&#8217;,<br />
&#8216;numberposts&#8217; =&gt; 2,<br />
// $post-&gt;ID will get the ID of the current page<br />
&#8216;post_parent&#8217; =&gt; $post-&gt;ID,<br />
&#8216;order&#8217; =&gt; ASC,<br />
&#8216;orderby&#8217; =&gt; title<br />
);<br />
$subpages = get_posts($args);<br />
// Just another WordPress Loop<br />
foreach($subpages as $post) : setup_postdata($post);<br />
?&gt;<br />
<strong>   &lt;div&gt;</strong><br />
<strong>        &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;</strong><br />
<strong>        &lt;div&gt;&lt;a href=&#8221;&lt;?php the_permalink() ?&gt;&#8221;&gt;&lt;?php the_post_thumbnail(&#8216;thumbnail&#8217;); ?&gt;&lt;/a&gt;&lt;/div&gt;</strong><br />
<strong>        &lt;?php the_excerpt(); ?&gt;</strong><br />
<strong>    &lt;/div&gt;</strong><br />
&lt;?php endforeach; ?&gt;<br />
&lt;?php } else { ?&gt;<br />
Page does not have children</p>
<p>&lt;?php }; ?&gt;</p></blockquote>
<p>That&#8217;s it! You can display what ever you want in the &#8220;Page does not have children&#8221; section if the page does not have any children. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2011/08/16/how-to-get-an-excerpt-and-thumbnail-from-child-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add custom menuing to WordPress themes for WordPress 3.0</title>
		<link>http://jaypwhy.com/2011/08/16/how-to-add-custom-menuing-to-wordpress-themes-for-wordpress-3-0/</link>
		<comments>http://jaypwhy.com/2011/08/16/how-to-add-custom-menuing-to-wordpress-themes-for-wordpress-3-0/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 17:32:31 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom menus]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 3.0]]></category>

		<guid isPermaLink="false">http://jaypwhy.com/?p=1216</guid>
		<description><![CDATA[First off, I have had to scour the internet on multiple occasions to figure out how to actually build a WordPress theme with custom menus. The WordPress Codex has been pretty informative, but if you are just now adapting WordPress themes to WordPress 3.0, it can be a bit confusing. In your theme folder in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jaypwhy.com/wp-content/uploads/2011/08/screenshot.png"><img class="aligncenter size-full wp-image-1229" title="screenshot" src="http://jaypwhy.com/wp-content/uploads/2011/08/screenshot.png" alt="" width="770" height="215" /></a>First off, I have had to scour the internet on multiple occasions to figure out how to actually build a WordPress theme with custom menus. The WordPress Codex has been pretty informative, but if you are just now adapting WordPress themes to WordPress 3.0, it can be a bit confusing.</p>
<p>In your theme folder in <strong>functions.php</strong> you have to register your menus. If you only want to one custom menu for your theme, use:</p>
<blockquote style="background-color: #fff;"><p><code>register_nav_menus( array( 'Menu_location' =&gt; 'Menu Description' ) );</code></p></blockquote>
<p><em>( Replace Menu_location with your own name like Footer_menu etc&#8230; Replace Menu Description with whatever you want to call that menu. )</em></p>
<p>If you want to register more that one menu, you have to set up an array of menus using the <strong>register_nav_menus();</strong> function. See the Example Below:</p>
<blockquote style="background-color: #fff;"><p>register_nav_menus(<br />
array(<br />
&#8216;primary&#8217;=&gt;&#8217;Primary Menu&#8217;,<br />
&#8216;linksidebar&#8217;=&gt;&#8217;Link Sidebar&#8217;,<br />
&#8216;footer&#8217;=&gt;&#8217;Footer Menu&#8217;<br />
));</p></blockquote>
<p>After your have registered either your menu or menus, open up the page in which you want to have the custom menu on. For my example, I am making the &#8220;primary&#8221; menu my main navigation, so I&#8217;m including it in <strong>header.php</strong>. Find where you want the custom menu to reside, and use the following to add the menu:</p>
<blockquote style="background-color: #fff;"><p>&lt;?php wp_nav_menu( array( &#8216;theme_location&#8217; =&gt; &#8216;primary&#8217; ) ); ?&gt;</p></blockquote>
<p>In this example I am using the &#8216;primary&#8217; menu. Replace &#8216;primary&#8217; with whatever you have named your menu location.</p>
<p><a href="http://jaypwhy.com/wp-content/uploads/2011/08/sdf.png"><img class="size-full wp-image-1234 alignleft" title="sdf" src="http://jaypwhy.com/wp-content/uploads/2011/08/sdf.png" alt="" width="416" height="215" /></a>Next, log into the WordPress Backend of your site and click on the Appearance tab on the left hand side of the Admin panel. In the Appearance group select Menus. On the Menus screen you will see the menus that you have registered in the functions.php file with drop downs. Below this box, you will find pages, posts, categories, and custom links that you can add to the menu on the right. Once you have added these, you can rename them or keep them the same</p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2011/08/16/how-to-add-custom-menuing-to-wordpress-themes-for-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cat Called Frisky &#8211; Free Vector</title>
		<link>http://jaypwhy.com/2009/12/03/cat-called-frisky-free-vector/</link>
		<comments>http://jaypwhy.com/2009/12/03/cat-called-frisky-free-vector/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 21:37:03 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[vectors]]></category>

		<guid isPermaLink="false">http://www.jonnopierce.com/?p=1162</guid>
		<description><![CDATA[Another vector created spur of the moment. Free to use, just let me know! Click Here to Download &#8220;Cat Called Frisky&#8221;]]></description>
			<content:encoded><![CDATA[<p>Another vector created spur of the moment. Free to use, just let me know!</p>
<p><a href="http://www.jonnopierce.com/AI/cat.ai"><img class="aligncenter size-full wp-image-1165" title="cat" src="http://jaypwhy.com/wp-content/uploads/2009/12/cat.jpg" alt="cat" width="600" height="450" /></a></p>
<p><a href="http://www.jonnopierce.com/AI/cat.ai">Click Here to Download &#8220;Cat Called Frisky&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2009/12/03/cat-called-frisky-free-vector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retro Flower &#8211; Free Vector</title>
		<link>http://jaypwhy.com/2009/12/02/retro-flower-free-vector/</link>
		<comments>http://jaypwhy.com/2009/12/02/retro-flower-free-vector/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 03:50:39 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[vectors]]></category>

		<guid isPermaLink="false">http://www.jonnopierce.com/?p=1154</guid>
		<description><![CDATA[Sometimes I just let my brain go where it wants to while drawing. Rather than focus on drawing a certain object, I focus more on line and shape. In the end this is what I came up with! Free to use! just let me know! Click Here to Download &#8220;Retro Flower&#8221;]]></description>
			<content:encoded><![CDATA[<p>Sometimes I just let my brain go where it wants to while drawing. Rather than focus on drawing a certain object, I focus more on line and shape. In the end this is what I came up with! Free to use! just let me know!</p>
<p><a href="http://www.jonnopierce.com/AI/retroflower.ai"><img class="aligncenter size-full wp-image-1156" title="retroflower" src="http://jaypwhy.com/wp-content/uploads/2009/12/retroflower.jpg" alt="retroflower" width="600" height="468" /></a><br />
<a href="http://www.jonnopierce.com/AI/retroflower.ai">Click Here to Download &#8220;Retro Flower&#8221; </a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2009/12/02/retro-flower-free-vector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Panda &#8211; Free Vector</title>
		<link>http://jaypwhy.com/2009/12/01/happy-panda/</link>
		<comments>http://jaypwhy.com/2009/12/01/happy-panda/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 22:03:51 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[vectors]]></category>
		<category><![CDATA[buddha]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[free vector]]></category>
		<category><![CDATA[panda]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.jonnopierce.com/?p=1147</guid>
		<description><![CDATA[For some reason while I was sketching around last night, I kept drawing a panda. The further that I went with the sketch, the more it began to develop into a fat Buddha. The Vector is Free to use, just let me know! Click here to Download &#8220;Happy Panda&#8221;]]></description>
			<content:encoded><![CDATA[<p>For some reason while I was sketching around last night, I kept drawing a panda. The further that I went with the sketch, the more it began to develop into a fat Buddha. The Vector is Free to use, just let me know!</p>
<p><a href="http://www.jonnopierce.com/AI/panda.ai"><img class="aligncenter size-full wp-image-1148" title="panda2" src="http://jaypwhy.com/wp-content/uploads/2009/12/panda2.jpg" alt="panda2" width="600" height="622" /></a><br/ ><br />
<a href="http://www.jonnopierce.com/AI/panda.ai">Click here to Download &#8220;Happy Panda&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2009/12/01/happy-panda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For the Birds &#8211; Free Vector</title>
		<link>http://jaypwhy.com/2009/11/30/for-the-birds-free-vectors/</link>
		<comments>http://jaypwhy.com/2009/11/30/for-the-birds-free-vectors/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:04:12 +0000</pubDate>
		<dc:creator>jon8504</dc:creator>
				<category><![CDATA[vectors]]></category>
		<category><![CDATA[birds]]></category>
		<category><![CDATA[doodle]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[free vector]]></category>
		<category><![CDATA[illustration]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://www.jonnopierce.com/?p=1088</guid>
		<description><![CDATA[In my spare time I decided to create some vectors out of some of my daily doodles. A while back in college I created a flash piece with a bird as one of the little movieclips. I used that bird as the inspiration as these doodles.  Here is the first set. I hope you enjoy! [...]]]></description>
			<content:encoded><![CDATA[<p>In my spare time I decided to create some vectors out of some of my daily doodles. A while back in college I created a flash piece with a bird as one of the little movieclips. I used that bird as the inspiration as these doodles.  Here is the first set. I hope you enjoy!</p>
<p><a href="http://www.jonnopierce.com/AI/birds.ai"><img class="aligncenter size-full wp-image-1089" title="birds" src="http://jaypwhy.com/wp-content/uploads/2009/11/birds.jpg" alt="birds" width="600" height="355" /></a></p>
<p><a href="http://www.jonnopierce.com/AI/birds.ai">Click Here to download &#8220;For the Birds&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaypwhy.com/2009/11/30/for-the-birds-free-vectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

